Extra Page Printed
I have a report with header, footer and 4+ subreports at the bottom of the
master detail band. (Only one record prints in detail band.) The sub reports
have a title, detail and some have a summary band. The title band should
always print. But if there is no data in the subreport, the detail and/or
summary bands should not print.
I've experimented by trying to set both the visible property to false and
the height of these bands to 0 in the BeforeGenerate event of the band if
there is no data. This works for the printing of the band. However, it
appears that the system determines if a second page is needed before these
events fire, so it uses the default height (or visibility) to decide if
additional pages are necessary.
The result is that in certain circumstances, all the information is printed
on page one, including the titles of the subreports. But it then prints a
second page, sometimes with just the header and footer of the master report.
Or it sometimes repeats the title of the last one or two subreports on the
second page. I need to prevent these erroneous additional pages from being
printed.
- Is setting the height and/or visibility the proper way to eliminate
printing of the unnecessary bands?
- If so, in what event should the properties be set so that the system can
accurately determine if additional pages are needed?
- If not, what method should be used?
Thanks,
John
P.S. D6, RB10.04
master detail band. (Only one record prints in detail band.) The sub reports
have a title, detail and some have a summary band. The title band should
always print. But if there is no data in the subreport, the detail and/or
summary bands should not print.
I've experimented by trying to set both the visible property to false and
the height of these bands to 0 in the BeforeGenerate event of the band if
there is no data. This works for the printing of the band. However, it
appears that the system determines if a second page is needed before these
events fire, so it uses the default height (or visibility) to decide if
additional pages are necessary.
The result is that in certain circumstances, all the information is printed
on page one, including the titles of the subreports. But it then prints a
second page, sometimes with just the header and footer of the master report.
Or it sometimes repeats the title of the last one or two subreports on the
second page. I need to prevent these erroneous additional pages from being
printed.
- Is setting the height and/or visibility the proper way to eliminate
printing of the unnecessary bands?
- If so, in what event should the properties be set so that the system can
accurately determine if additional pages are needed?
- If not, what method should be used?
Thanks,
John
P.S. D6, RB10.04
This discussion has been closed.
Comments
I recommend using the BeforePrint event of the band in the main report (the
band that contains the subreports.)
The BeforeGenerate event occurs too late.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com