Print Page | Close Window

averages on suppliers paid days

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22329
Printed Date: 29 Apr 2024 at 2:04pm


Topic: averages on suppliers paid days
Posted By: NeilG
Subject: averages on suppliers paid days
Date Posted: 13 Jun 2017 at 12:05am
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.



Replies:
Posted By: lockwelle
Date Posted: 23 Jun 2017 at 8:25am
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



Print Page | Close Window