Is there any way to put a conditional page break?

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,
 
A

Allen Browne

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.
 
M

Mike

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,
 

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

Top