Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Running Total Help Post Reply Post New Topic
<< Prev Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Feb 2010 at 12:07pm

Drop your second formula field. It is throwing it all into the last month hence the huge numbers.

So you want it to only show the months  between the param dates and show a count of records per month?
 
If you are counting records and you have no dupe records make a formul field as MOnthCount:
if {table.date} <= {?date_start} then 0 else 1
Continue to group on the altered MOnth field formula (same as your first CT) but now instead for your Summarized Field use the @MonthCOunt formula as a SUM


Edited by DBlank - 26 Feb 2010 at 12:08pm
IP IP Logged
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Posted: 26 Feb 2010 at 12:20pm
I probably should have mentioned that there are 4 summarized fields in this CT, and there is a grand total at the very end of the CT.

It is only the ?date_end month that is getting the huge number.

I did add your formula to my summarized fields, but the numbers did not add up correctly..

Sorry for all the posts!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Feb 2010 at 12:35pm
No prob.
can't quite visulaize your CT so having trouble giving you an answer.
 
The reason your last month has a huge # is because that is where you 'moved' all the early records to in your formula.... if {table.date} <= {?date_start} then {?date_end} else {table.Date} ....
 
What are the 4 things you are doing in the CT?
 
IP IP Logged
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Posted: 26 Feb 2010 at 12:50pm
Hey dBlank,

Take a look at the screen photo below:
This will give you an idea of what the CT looks like.

http://i595.photobucket.com/albums/tt37/hammondrob/cr.jpg
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Feb 2010 at 6:18pm
Sorry, had to run out.
What is the field that gives John 217 for Jan 09 and how is it calculated? Meaning is it a count of sale records or Sum of a sales amount, or something else?
My guess is a SUM of a sales amount (per worker). If so create a formula field to zero out the amount field if the row has a date < ?param start called 'SalesUpdated':
if {table.date} <= {?date_start} then 0 else table.salesamount
Now you make the field to summarize as a SUM of this new formula @SalesUpdated
 
Does this make sense?
IP IP Logged
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Posted: 01 Mar 2010 at 6:48am
hey dblank,

I was away for the weekend, and just saw your response now. thank you so much for your help again.

your formula worked! and yes, the 217 for john was a sum indeed.

There is just one more small issue. Check out the link:

http://i595.photobucket.com/albums/tt37/hammondrob/ct2.jpg

If you look at '08 Jun in CT1 and '08 Jul in CT2, you will notice that the RT does not pick up the 2 records in June (the equation is CT1 Jun 08 + CT1 Jul 08 = CT2 Jul 08). That problem also applies to the CT2 '08 Sept RT.

Any idea?
IP IP Logged
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Posted: 01 Mar 2010 at 8:15am
I just figured out where the missing records were hiding.

Thank you so much for your help, i really appreciate it.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Mar 2010 at 8:17am

hard to tell but it is most likely how you have it resetting. That is in the SUmmary set up or in the last section of a Running Total.

IP IP Logged
<< Prev Page  of 2
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.