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

How to stop my running totals to reset at new page

Status
Not open for further replies.

dninus

Programmer
Feb 8, 2012
13
US
Hi,

I have a accumulation running totals declare as:
whileprintingrecords;
NumberVar Per_total := 0 //@Order_Per_reset placing on Period group header, group 1

whileprintingrecords;
NumberVar Per_total := Per_total + @Qty_order_SKU //@Order_Per_Accum // placing on SKU group footer, group 2 for accumulationn

whileprintingrecords;
NumberVar Per_total := Per_total //@Order_Per, placing in Period group footer to display the total has been accumulated.

@Order_Per_Accum does accumulates until the end of each page, when it is a new page, my @Order_Per_Accum reset to 0 and starts to accumulate all the data on second page and so on even it is still in the same group. For the next group, it does reset and does the same thing (reset on new page).
I don't have any special format or condition checking in the Section Expert.
I'm not sure why, please help!

Thank you very much for your time!
 
This happens because you have repeat group header on new page. Turn that off and it should be OK

Ian
 
You can leave the repeated group headers and just change your reset formula to:

whileprintingrecords;
NumberVar Per_total;
if not inrepeatedgroupheader then
Per_total := 0;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top