(reports) how to add page break on odd pages only?

G

Guest

I want to be able to add a page break to the the footer of my grouped field
which only operates if it is an odd page number. This is so that I can print
the document in duplex (using both sides of paper). What I am trying to avoid
is starting the report for one of my grouped organisations on the reverse
side of a piece of paper. E.g. If the report for organisation A goes from
pages 1 to 3, I want to add a page break so that the report for organisation
B prints on page 5, not page 4.
 
A

Allen Browne

Add a Page Break control (from the toolbox) to the group header.

In the section's Format event, set the Visible property of the Page Break
control where you want the page break. (It does have a Visible property,
even though the Intellisense does not show it.)

Use the Mod operation on the report's Page property to determine if it is an
odd page.

You will end up with something like this:

Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Me.PageBreak1.Visible = (([Page] Mod 2) = 1)
End Sub
 

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