Is there any way to put a conditional page break?

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi all,

As stated in the subject, I've some page breaks between subreports, but
when the subreports don't have data are not printed, but the page breaks
still produce extra blank pages.
Thank you in advance!
Cheers,
 
It is possible to insert a PageBreak control, and toggle its Visible
property in the Format event of the section that contains it.

However, you may find it easier to place your subreports into different
sections. For example, if you have a report that has a ClientID group
footer, and you want to put 3 subreports in there, consider putting ClientID
into the report's Sorting And Grouping dialog 3 times. By creating 3 group
footers, each subreport can go into a section of its own. By setting the
Keep Together property of each of these sections to True, Access will
automatically make a page break if the entire subreport won't fit on what's
left of the page.
 
It is possible to insert a PageBreak control, and toggle its Visible
property in the Format event of the section that contains it.

However, you may find it easier to place your subreports into
different sections. For example, if you have a report that has a
ClientID group footer, and you want to put 3 subreports in there,
consider putting ClientID into the report's Sorting And Grouping
dialog 3 times. By creating 3 group footers, each subreport can go
into a section of its own. By setting the Keep Together property of
each of these sections to True, Access will automatically make a page
break if the entire subreport won't fit on what's left of the page.

Thank you very much Allen.
I didn't know that you can repeat sections like you mentioned in your
second solution. I did that and now everything works as expected.
Cheers,
 
Back
Top