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

Group sum on second page is incorrect when repeating group header on each page 1

Status
Not open for further replies.

NBVC

Technical User
Sep 18, 2006
80
CA
I have a report with a group header that I want to repeat on each page (Group 2a) - GH1 is suppressed.

I went to the Group Expert and indicated to repeat on each page.

But now when the group extends to a second page the summary I had on the group footer only sums the values for the second page and doesn't include the values from the first page.

If I don't repeat the group header, then it sums correctly on the second page.

I have a "whileprinting" formula in the group 2a header:

Code:
WhilePrintingRecords;
Global NumberVar MyTotal := 0;

in group 4 header I have:

Code:
WhilePrintingRecords;
Global NumberVar MyTotal;
MyTotal := MyTotal + {@PlannedJobReq};

and in the Group 2a footer:

Code:
WhilePrintingRecords;
Global NumberVar MyTotal;
MyTotal

what do I need to do to be able to repeat the group header on each page and at the same time give me the correct sum for all values when extending to more than one page.
 
Add another GF section--GF2b that is set to suppress blank section and then move your reset formula from GH2 to GF2b and suppress it.

-LB
 
Thanks very much again for your help LB. It seems to have worked.

Just for my own education, can you explain a bit why that works as opposed to my original set up?
 
The reset formula in GH2a was resetting on every page because it was repeating on each page.

-LB
 
Ok. That makes sense.

Thanks again. I appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top