averages on suppliers paid days

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Hello,
I have a report for suppliers transactions where I am working out the days difference between the invoice created date and the payment date (using datediff 'd').
The report is grouped by supplier as well, this is all OK to work out my issue is with the following.

I need to Sum the days difference in the following way
1) 30 days or less
2) Greater than 30 days but less than equal 60 days
3) Greater than 60 days

Again not to difficult but I then need to create averages for the payment criteria above.

I can't get the averages, the sums or the grouping correct for each supplier and when transactions were paid.

I have one group for supplier but should I have a group for days difference as well ?. If so how does the sums and averages work out.

I'm OK with crystal reports but first time in working out averages for multiple transactions paid at different day differences.
what I would do is use either variables or running totals. The idea is the same. For each detail, you are calculating which bucket it falls into, increment the variables that are specific to the bucket (total and count) then in the group footer, you can easily calculate an average for each bucket.

Unless I have the wrong problem. In which case, this might be a path the solution you need.

HTH