×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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.

RE: Group sum on second page is incorrect when repeating group header on each 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

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

(OP)
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?

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

The reset formula in GH2a was resetting on every page because it was repeating on each page.

-LB

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

(OP)
Ok. That makes sense.

Thanks again. I appreciate it.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close