Click to See Complete Forum and Search --> : Sum in footer help


mboucher
December 3rd, 2008, 08:29 PM
Hi,

I'm trying to create a customer account statement using Crystal Reports XI, pulling the data from a SQL database.

I have the line details, so invoices and credit notes etc all working fine.

What I now need to do is add aged totals to the bottom of each customer's statement.
So there would be a full total, one for any transactions due between 1 and 2 months ago, another between 2 and 3 months ago and so on.

I have tried a formula but this adds up the totals for all customers.
I have tried a SQL expression but this says the customer code field is not in the group by clause, and I can't work out how to edit the SQL statement to add it to the group by clause.

Any suggestions on how I can overcome this problem?

Thanks,
Michael

DBlank
December 17th, 2008, 03:37 PM
I think you should be able to use running totals to get the sums you are looking for.
Without more specific information it would be difficult to know exactly how to accomplish this for you.
The general process is that you can create running totals and use formulas at the evaluate portion of it to define exact conditions for sums which you describe as
"one for any transactions due between 1 and 2 months ago, another between 2 and 3 months ago and so on".
Keep in mind that Running totals have to be in group footer or report footers. They cannot be moved to headers like a Summary.