I need to make a report that takes a rolling 12 month period.
Each row needs to show the sum of the current months value and all the 11 months prior.
For example, I have a count of items in their respective Months
2 - Jan 06
5 - Feb 06
2 - Mar 06
4 - April 06
2 - May 06
1 - June 06
2 - July 06
5 - Aug 06
2 - Sep 06
2 - Oct 06
4 - Nov 06
2 - Dec 06
2 - Jan 07
3 - Feb 07
1 - Mar 07
What I need as an output is
Jan 07 = 35
Feb 07 = 33
Mar 07 = 32
So each row sums the current and previous 11 rows.
I am using Crystal Report v10 and SQL Database.
Thanks,
DavidThe quick solution in my mind is.
Create a subreport and store the whole data in an array.
Now come to the actual report and while showing the current record you can sum the previous 11 months records from the array and show it there.|||Great thanks for the Idea, I got it working with an array and then another formula summing the 12 in the array. I haven't played with the chart function yet, i have to get all these fields totaling first. Any suggestions getting all the fields in the details section ploted into a chart (the ultimate goal. Each displayed point is a date and the summed 12 month total.|||Keep one thing in mind while dealing with the charts.
You can show/draw more then one values on change of some value. e.g on change of date you can show the sum of previous 11 months.
Also you can get the accumulative .
You have to explore the charts for your project.|||Thanks so much for your help. Sometimes I just need a little bump into the right direction and I can figure it out. I got it working now.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment