Page numbers with sub Reports

  • Thread starter Thread starter TK
  • Start date Start date
T

TK

I have a main report with 4 sub reports. It is a school registration
document. So, when we print it for an entire class the actual pages may be
150 (30 students * 5 pages each). Today I tried to turn on the page header
and footer to set up page numbering and it totally messed everything up. Not
only did the report not format correctly, but somehow it seemed to be in an
endless loop trying to format. I had many, many empty pages and never got
the report I wanted. I turned off page header and footer and everything was
back to normal.
How can I put page numbers on this report so that they will always start
with page one on the main report and subsequent numbers on the subReports?
Thanks in advance.
TK
 
TK:

Only use page headers and footers on the main report (they won't show on the
sub reports anyway.) If you have endless loops in formatting, then check
any VBA code you have in the On Format event and add a little wrapper like
this:

If FormatCount = 1 Then
'Your code here
End if

Then simply add a control in the page footer with a control source like:

=[Page] & " of " & [Pages]
 
That's all I did was to turn them on for the main report. They are not
turned on for the sub Reports. When I turned them on in the main report the
pages got all messed up. At first I thought it was because it added extra
length to the report, but I tried making the detail section shorter and that
did not help at all.
Thanks for the input on the possible formatting problem, but can you think
of why the above is happening?
Thanks.
TK

SA said:
TK:

Only use page headers and footers on the main report (they won't show on the
sub reports anyway.) If you have endless loops in formatting, then check
any VBA code you have in the On Format event and add a little wrapper like
this:

If FormatCount = 1 Then
'Your code here
End if

Then simply add a control in the page footer with a control source like:

=[Page] & " of " & [Pages]
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

TK said:
I have a main report with 4 sub reports. It is a school registration
document. So, when we print it for an entire class the actual pages may be
150 (30 students * 5 pages each). Today I tried to turn on the page header
and footer to set up page numbering and it totally messed everything up.
Not
only did the report not format correctly, but somehow it seemed to be in
an
endless loop trying to format. I had many, many empty pages and never got
the report I wanted. I turned off page header and footer and everything
was
back to normal.
How can I put page numbers on this report so that they will always start
with page one on the main report and subsequent numbers on the subReports?
Thanks in advance.
TK
 
Back
Top