Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine number of pages 1

Status
Not open for further replies.

GavinP

MIS
Jul 1, 2005
17
GB
I have a report which contains all the branches within the company. However, when printing them, we filter for the individual branch. Most of the branch reports are two pages long, but some of the newer branches only generate data for one page. I need to know how many pages are being printed to PDF, in order to put a blank page in to get the duplex printing correct. Is there a way of doing this?
 
Add a pagebreak control to the branch group footer and then make it visible/invisible depending on the page number:

Like:
Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)

If Me.Page Mod 2 = 1 Then
Me.PageBreak25.Visible = True
Else
Me.PageBreak25.Visible = False
End If


End Sub
 
lupins.

Thanks. I hadn't thought of that as a solution. Only problem is that I get a blank page with all my labels on, but no data. Is there a way around that as well?

Many thanks.

Gavin
 
I don't know of any way; so I shall be interested to see if someone else posts a solution.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top