Having Report footer not include Page Head

D

Don

Hello, I have an invoice report that has a page header that takes up about
the top 1/3 of each page, the exception is the last page which is a full page
of terms and condition. How can I supress the page header information on the
last page?

Thanks
 
M

Marshall Barton

Don said:
Hello, I have an invoice report that has a page header that takes up about
the top 1/3 of each page, the exception is the last page which is a full page
of terms and condition. How can I supress the page header information on the
last page?


Try using code in the page header section's Format event:

Cancel = (Me.Page = Me.Pages)

That code requires that there be a text box on the report
that refers to Pages. The usual text box expression:
=Page & " of " & Pages is sufficient.
 
D

Duane Hookom

I would probably not use a Page Header for this. Consider creating a new
highest level sorting and grouping on a constant like =1. Display the header
for this level and make the =1 group header height about 1/3 of a page. Set
the Repeat Section property of this section to Yes. Move the previous header
controls into this new section and remove the Page Header section.

Then use code in the On Format event of the =1 group header to cancel the
printing if [Page]=[Pages]. You may need to add a text box bound to [pages]
in the report.
 
M

Marshall Barton

Duane said:
I would probably not use a Page Header for this. Consider creating a new
highest level sorting and grouping on a constant like =1. Display the header
for this level and make the =1 group header height about 1/3 of a page. Set
the Repeat Section property of this section to Yes. Move the previous header
controls into this new section and remove the Page Header section.

Then use code in the On Format event of the =1 group header to cancel the
printing if [Page]=[Pages]. You may need to add a text box bound to [pages]
in the report.


Good idea Duane.

Two additional thoughts:
1) There is no need to check Page=Pages because the group
has completed before the report footer starts (assuming the
report footer's ForceNewPage is set to Before Section).

2) If you cancel or make a section invisible when its
RepeatSection is set to Yes, A2002 gpes into an infinite
loop. A2003 avoids the loop by resetting the RepeatSection
property to No.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top