Can PageHeader See Ahead?

  • Thread starter Thread starter Markus
  • Start date Start date
M

Markus

Is there any way to get PageHeader_Format to see that the
last page is next? My reports have an unpredictable
number of pages, so I can't use page number as the
trigger. I would like for the header to make itself
invisible before the last page formats. Thanks.
 
Is there any way to get PageHeader_Format to see that the
last page is next? My reports have an unpredictable
number of pages, so I can't use page number as the
trigger. I would like for the header to make itself
invisible before the last page formats. Thanks.

Do you not wish to print the header on the last page or on the next to
the last page?

If you add an unbound control to the report to compute [Pages]:
= [Pages]
(you can make it not visible if you wish)
or..
= "Page " & [Page] & " of " & [Pages]

you can then code the Page Header Format event:
Cancel = [Page] = [Pages]
to not show on the last page,
or
Cancel = [Page] = [Pages]-1
to not show on the next to the last page.
 
Do you not wish to print the header on the last page or on the next to
the last page?

If you add an unbound control to the report to compute [Pages]:
= [Pages]
(you can make it not visible if you wish)
or..
= "Page " & [Page] & " of " & [Pages]

you can then code the Page Header Format event:
Cancel = [Page] = [Pages]
to not show on the last page,
or
Cancel = [Page] = [Pages]-1
to not show on the next to the last page.

This normally would be the perfect solution. However, I
am printing 700+ reports at once, which requires 2300
pages. I guess I could write code that sends each report
to the printer individually, in which case your solution
would work. Is that my next best option? Thanks.
 
Back
Top