Resetting the page number on break event
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?
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?
This discussion has been closed.
Comments
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
http://www.digital-metaphors.com
info@digital-metaphors.com