Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Resetting Running Totals

Status
Not open for further replies.

TallGuyinIT

IS-IT--Management
Oct 18, 2004
34
US
New at working with Crystal, so you will need to be patient.

I have a report with a running total named "Daily Total". I also have a variable "print running total" which will equal 1 to 6.

I am trying to reset "Daily Total" back to zero after "print running total" = 3. In "daily total" I have the reset formula as;

WhilePrintingRecords;
Previous(print running total)=3

This resets the running total to zero after the second group, so the totals on group 3 =0. I have tried all different formulas and commands. Either the totals do not reset or they reset in the wrong group. Any ideas?

 
Please explain your report layout (groups, etc), and also show the content of the formulas you are referencing here. Can't really tell if you are working with an inserted running total or a manual running total using a variable. If an inserted running total, please explain how it is set up. Is "print running total" a database field? If so, the convention is to show it as {table.printrunningtotal}. If an inserted running total, show it as {#runningtotal}, etc.

It would help to see some sample data, too.

-LB
 
print running total as used below is neither a variable nor a formula.

WhilePrintingRecords;
Previous(print running total)= 3

If it were a variable, it would have to be declated in the formula, and if it's a formula, it would have curly braces and a @symbol.

I suggest you post example data and expected output.

-k

 
Sorry, here are the formulas

@PrintRunningTotal =
IF {@Grouping}>=1 AND {@Grouping}<=5 THEN 1 ELSE
IF {@Grouping}=6 THEN 2 ELSE
IF {@Grouping}>=7 AND {@Grouping}<=9 THEN 3 ELSE
IF {@Grouping}>=10 AND {@Grouping}<=13 THEN 4 ELSE
IF {@Grouping}>=14 AND {@Grouping}<=19 THEN 5 ELSE 6


I am trying to set my running total #DailyTotal back to zero between 3 and 4. My reset formula for #DailyTotal is
WHILEPRINTINGRECORDS;
{@PrintRunningTotal}=3

I hope this is clearer. Thank you for your help.
 
We don't know what's in {@Grouping}...

Both responders asked for sample data.

-k
 
Please reread my post and try to answer the questions asked. Also, how is the running total set up?

-LB
 
On second thought, I think you should explain what you are trying to do. If you are trying to get subtotals for clusters of groups, create an outer group using a formula like this:

if {@PrintRunningTotal} <= 3 then 1 else 2

Insert a group on this and go to the group expert and make it your first group. Then you could insert summaries to get your subtotals.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top