Microsoft
Software
Hardware
Network
Question : Selecting Records in Crystal Reports 11
Hi
I need to create a report that is based on customer ID records that return multiple records based on the Payer e.g. a customer ID will show 3 records for a particular sale if the Payment consists of 3 payers. e.g
Customer ID Payer Cost
1 BT £100
1 Yahoo £50
1 Google £25
I need to return the data above, showing only on one row e.g.
Customer ID Payer 1 Cost 1 Payer2 Cost2 Payer3 Cost3
1 BT £100 Yahoo £50 Google £25
By using the next function i am only able to show:
Customer ID Payer 1 Cost 1 Payer2 Cost2
1 BT £100 Yahoo £50
The code i have used to achieve this is below and placed in a group header (tiled Payer 2), to show only one customer ID:
if {CustomerID}= next ({CustomerID}= })
then
next ({JobInvoiced.PayerName})
To show the Cost2, i have used the following code:
if {CustomerID}= next ({{CustomerID})
then
next ({JobInvoiced.Gross})
What i want to know is how i can cylce through each record that has the same customer Id number, and then show that data on the same row. The Next function will only allow you to test the next record but i want to keep testing each record that has the same customer ID so there could be upto 4 next records.
I hope this makes sense.
regards
DGI
Answer : Selecting Records in Crystal Reports 11
Check the attachments.
Save and change the txt extensions to RPT.
mlmcc
Q-23632767.txt
(45 KB)
(File Type Details)
Simple Reports allows 1 Customer
Q-23632767-Groups.txt
(45 KB)
(File Type Details)
Reports uses group on customer to allow multiple customers
Q-23632767.mdb
(116 KB)
(File Type Details)
Database for the reports
Random Solutions
Windows 2003 Server SP2 - Event ID's 1030 and 1058 Errors
regex matching - multiple lines
Sniffer prog needed
How to remove Symantec WinFax
Trying to pull data from last year using LastYearYTD and it's not working - How do I use Set Print Date properly?
Should I disable the SA login for security reasons in SQL Server 2000?
Writing bits to screen in Direct Draw
Automate change of multiple local user passwords on a single server
Ntoskrnl.exe is missing or corrupt.
Check to see when program was installed.