Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Calculate Quarter Value Post Reply Post New Topic
Author Message
kmbunz1
Newbie
Newbie


Joined: 29 Sep 2010
Location: United States
Online Status: Offline
Posts: 3
Quote kmbunz1 Replybullet Topic: Calculate Quarter Value
     Posted: 30 Jul 2011 at 1:41pm
I am using CR 11, I am pulling data from a sql db.  I am creating a report that lists data from a table below:
Table: Historic_Data
year
month_number
entity_code
pounds
qtr 
year_qtr  

I currently have the data sorted by month and year_qtr (EX- 2009-Q1) and I have a Running Total that calculates the total pounds for each month.  So like below:

Months:                        Running Total:                   
May 2009-Q2                31,612.00
June 2009-Q2               308,254.00
July 2009-Q3                138,824.33

I also have another Running total that will display the average for each month.  It takes the running total and counts the values and divides it. so I then get this:

Months:                        Running Total:          Month Average  
May 2009-Q2                31,612.00                  1975.75
June 2009-Q2               308,254.00                5604.62
July 2009-Q3                138,824.33                7712.46

Now this is where I get stuck,  what I want to do now is display the Average for the QTR instead of the month.  So looking at the example above for 2009-Q2, I would like to have only the end of the qtr value displayed.

Months:                        Running Total:          QTR Average  
May 2009-Q2                31,612.00                  7580.37
June 2009-Q2               308,254.00                7580.37

I want this so when I graph it, it will have it where for the qtr's,, it will have the average.

Any ideas on how to do this?  Thanks in advance!


Thanks in Advance!
Using Crystal Reports XI
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Aug 2011 at 3:51am

insert a  grouping on year and quarter

create another RT that counts the that resets itself at that group level that same way you did for the month version
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum