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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need reset in GF

Status
Not open for further replies.

tjones3d

Programmer
Sep 2, 2009
8
US
This is my previous work in this thread, in case

I was able to use RunningTotal for the formula in GH, however I am unable to reset it back to 0 for the next group.

GH4: W1234/1/0

1st: 2nd: 3rd: 4th: 5th:
GH5: 10 240 0 $14.87 $0.00
20 208 32 $48.26 $1,544.37
30 211 0 $49.34 $0.0
40 214 0 $50.38 $0.00
50 211 3 $50.83 $152.49

GF4: $1,696.86

I need GF4 to reset for next group, since I do not want it to add the cost to the next group, however I will want the grand total of all to the last report. But this time I need to reset it to 0 for the next group?

Currently I have RunningTotal formula in GH5 for GF4 total
whileprintingrecords;
numbervar sumOS := sumOS + {@Op_Scrap};

and formula in GF4
whileprintingrecords;
numbervar sumOS;
 
When you are using manual running totals, you need separate variables for each level you want a summary. So you need a reset in GH#4 like this:

whileprintingrecords;
numbervar sumOS;
if not inrepeatedgroupheader then
sumOS := 0;

For the grand total, you don't need a reset. Change your formula to:

whileprintingrecords;
numbervar sumOS := sumOS + {@Op_Scrap};
numbervar grTot := grTot + {@Op_Scrap};

Then in the report footer use a display formula:

whileprintingrecords;
numbervar grTot;

-LB
 
Thanks, it works. My brain is all fuddled now with too many different numbers. I'll have to look at this while my mind is cleared up. Thanks so much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top