I am using crystal reports 8.5 and I am connecting via ODBC to a Microsoft Access database and I am using a stored procedure.
The stored procedure is bringing back data like this:
Date DebtID ChequeAmount
01/01/04 20101 110.00
02/01/04 20345 90.00
03/01/04 20589 70.00
05/01/04 20101 110.00
06/01/04 20589 70.00
As you can see the stored procedure is in order by the date field and whenever a debt id is displayed more than once it displays the same cheque amount (eg 110.00 for debt 20101). This is correct and I need the report to remain sorted by the date field. However how can i sum (grand total) the cheque amount field but only sum the first returned amount for each debt?
EG - i would like my sum for the above to only be for the first occurrence of each debt id:
20101 110.00
20345 90.00
20589 70.00
Result = 270.00
The stored procedure is bringing back data like this:
Date DebtID ChequeAmount
01/01/04 20101 110.00
02/01/04 20345 90.00
03/01/04 20589 70.00
05/01/04 20101 110.00
06/01/04 20589 70.00
As you can see the stored procedure is in order by the date field and whenever a debt id is displayed more than once it displays the same cheque amount (eg 110.00 for debt 20101). This is correct and I need the report to remain sorted by the date field. However how can i sum (grand total) the cheque amount field but only sum the first returned amount for each debt?
EG - i would like my sum for the above to only be for the first occurrence of each debt id:
20101 110.00
20345 90.00
20589 70.00
Result = 270.00