Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Resetting the page number on break event

edited June 2002 in General
I have a report with 3-4 sub reports and want to reset the page number
being displayed on the first page back to 1 when the say parcel number
changes. This way on a new parcel, the master section will always
say page number one and sub report 2 will say page number 2 and so
on. The thing I cannot figure out is, subreport 2 could have say 2
pages and the same with the others, so I could not find a way to use
the calc tab and count the number of pages myself instead of trying to
reset the page number variable itself. Any ideas as to how I could do
this?

Comments

  • edited June 2002
    You can determine when a new page is printing by using the
    Report.OnStartPage event, which fires once for each page. Use a TppVariable
    and its OnCalc event to code the page increment. If you have a group for
    parcel number, you can reset the variable on a group by accessing its Timing
    dialog and setting the group to break on. If you have a simple master
    detail with no groups, then just reset the variable's value when the new
    master begins printing by using the main report's Detailband.BeforeGenerate
    event.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.