Page numbering bug?

  • Thread starter Thread starter SF
  • Start date Start date
S

SF

Hi,

I have a report that contain 2 level of sub reports (sub report of sub
report in this main report), Once in a while the page number on the last
page would show 'Page 8 of 7', however page numbering from page 1 thru 7 is
OK (correct one).

Does somebody face this problem before?

SF
 
Yes. This typically happens if you use the events of the sections of the
report to show, hide, repeat sections, or change section heights, or force
page breaks.

Access fires those events only for the pages it needs to calculate. So the
actual page numbers don't end up matching the way it originally calculated
the page count (which did not take the event code into account.)

The workaround is to avoid using the report section's events like that. For
example, you may be able to use a Cartesian Product to generate multiple of
a record instead of setting properties such as MoveRecord, MoveLayout, and
PrintSection. There's an example of that in this article:
Print a Quantity of a Label
at:
http://allenbrowne.com/ser-39.html
 
Thank you.

Sf


Allen Browne said:
Yes. This typically happens if you use the events of the sections of the
report to show, hide, repeat sections, or change section heights, or force
page breaks.

Access fires those events only for the pages it needs to calculate. So the
actual page numbers don't end up matching the way it originally calculated
the page count (which did not take the event code into account.)

The workaround is to avoid using the report section's events like that.
For example, you may be able to use a Cartesian Product to generate
multiple of a record instead of setting properties such as MoveRecord,
MoveLayout, and PrintSection. There's an example of that in this article:
Print a Quantity of a Label
at:
http://allenbrowne.com/ser-39.html
 

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

Back
Top