Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Running Totals Post Reply Post New Topic
Author Message
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Topic: Running Totals
    Posted: 08 Feb 2010 at 10:45am
Crystal Reports 11.5

-Using a crosstab and a running total.
-I have a date selector parameter (date_from - date_to)

If for each month there is one 1 new record created, and since there is a running total, the month amount grows exponential by 1 each time:

Jan Feb Mar Apr May Jun
1    2    3    4    5    6

However, if I run a report from May – Jun, my results would display:

May Jun
1   2

Is it possible to run a date span; display only the months you specify; but keep the running total from numbers which are not displayed?:

May Jun
5   6

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Feb 2010 at 12:01pm
Not as such. a RT will only calculate the data that actually exists in the report.
Why not just use the Month value itself?
Month(date)
IP IP Logged
hammondrob
Newbie
Newbie


Joined: 08 Feb 2010
Location: Canada
Online Status: Offline
Posts: 21
Quote hammondrob Replybullet Posted: 08 Feb 2010 at 12:12pm
Thanks for the reply.
Unfortunately, it is a little more complicated. My example was more of an analogy.

In a nutshell:

Our data in our SQL database has records going back to June 01, 2008.

When we run the report (with a parameter) from July 1, 2008 to Dec 1, 2008 we still want the records in June to be carried over into the July total (even though June is not in the parameter)

To summarize: if June has 5 records, and July has 100 records, and we run the date range parameter is from June 1, 2008 to Dec 1, 2008, we want the records from June to be added to the July total.

So even though June is not being displayed in a column in the crosstab, we want its value to be carried over.
IP IP Logged
DBlank
Moderator
Moderator


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

Only things that come to mind would be:

write a stored proc to do a summary of the 'excluded' data items and bring that in as one row
OR
Pull all data and conditionally suppress rows based on your parameter
OR
Write a formula to compress all your rows that pre-date the param and use that in your process.
 
Any RT or formula would need to pull that 'count' to know where to begin.


Edited by DBlank - 08 Feb 2010 at 12:30pm
IP IP Logged
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.016 seconds.