Monday, March 26, 2012

Running totals: Custom Reset via Formula

Hi All,

I have attached a screenshot to help make up for my inability to describe the situation I'm dealing with here.

I have three groups within a report that currently use distinct Running Totals fields that Reset at the group levels that I assigned. I am attempting to create a single Running Totals field that will reset depending on which Group is being calculated at the moment so that I don't have to have a separate Running Totals object for each and every group. I'm not sure how to do this or write this formula as I'm new to Crystal Reports and am used to SQL Reporting Services where this evaluation is automatically done for you (I was spoiled I guess).

For example, if the Running Totals field control is in Group #1, I want it to reset at Group #1, and Group#2 to reset at Group #2.

So basically I'm attempting to use a formula to create a Reset point (view screenshot for detail) that is determined by which group the data is being calculated in. Is this possible? I realize that it is possible by simply creating a new running total object for each group, but this seems completely redundant and overly time consuming for larger reports where there are multiple groups.

I'm developing the report with Crystal Reports within Visual Studio 2005 if that helps any.

Please let me know if I can attach a screen shot or give more information to make my task clear.

Thanks!Either this will answer your question or I've totaly missed the point! (again..ahem)!

Enter a Running Total against the required field. In the Evaluate section select On Change of Group and select your relevant group header.

Very simple or completely wrong! I'll let you make your mind up!

Take it easy

Rob|||Either this will answer your question or I've totaly missed the point! (again..ahem)!

Enter a Running Total against the required field. In the Evaluate section select On Change of Group and select your relevant group header.

Very simple or completely wrong! I'll let you make your mind up!

Take it easy

Rob

Thanks for giving it a shot, Rob. =]

Yeah, I knew about the On Change of Group. I'm able to create a new running totals field for each individual group, but that's what I want to avoid. Instead of selecting the exact group, I'm trying to find a way to code it so that the field examines which group it is currently being evaluated in so that I don't have to create a running totals field for each group as I have a lot of fields that I'm getting the sum for in each group. This would cut my work by a third (or 1/4th for some reports as there will be 4 groups with running totals).|||Actually, a running total has to be placed in an appropreate group footer.
If it has to be reset on change of group#1, it has to be placed in GF1.
If it has to be reset on change of group#2, it has to be placed in GF2 but not in any other one.
How are you planning to solve that problem?|||Try to solve your problem with a new table, view or query where the subtotals are included
I use Crystal in all my projects but I know that it has limits ( or myself ) and always try to make my reports as simple as I can by resolving almost all the stuff at programming side

No comments:

Post a Comment