HOWTO: Reset Page Header for Each Group

  • Thread starter Thread starter Dan Johnson
  • Start date Start date
D

Dan Johnson

Printing invoices for multiple clients at same time. Some client invoices
have more than one page, some only one.

Want to add page header to pages 2 through the end for EACH invoice showing
date, etc at top of page. Can get this to work for one invoice, but
everyhting falls apart when processing more than one invoice.

I'm writing code, so which event should I be using
(PageHeaderSection_Format???) and what code should I add to accomplish this?

Thanks!

Dan
 
Dan said:
Printing invoices for multiple clients at same time. Some client invoices
have more than one page, some only one.

Want to add page header to pages 2 through the end for EACH invoice showing
date, etc at top of page. Can get this to work for one invoice, but
everyhting falls apart when processing more than one invoice.

I'm writing code, so which event should I be using
(PageHeaderSection_Format???) and what code should I add to accomplish this?


Presumably you are grouping on the client field. Make sure
you have the group header and footer sections for the group
(they don't need to be visible if you are not using them for
anything else). Then add code to the group footer's Format
event to make the page header section invisible:
Me.Section(3).Visible = False
and then set the group header section's ForceNewPage
property is set to BeforeSection. Use another line in the
group header's Format event to make the page header visible
again:
Me.Section(3).Visible = True

You'll also want to set the page header's Visible property
to NO in the report's design view for the first client.
 
Thank you , Marshall. Works perfectly.

Dan

Marshall Barton said:
this?


Presumably you are grouping on the client field. Make sure
you have the group header and footer sections for the group
(they don't need to be visible if you are not using them for
anything else). Then add code to the group footer's Format
event to make the page header section invisible:
Me.Section(3).Visible = False
and then set the group header section's ForceNewPage
property is set to BeforeSection. Use another line in the
group header's Format event to make the page header visible
again:
Me.Section(3).Visible = True

You'll also want to set the page header's Visible property
to NO in the report's design view for the first client.
 
Back
Top