Duplex Report Help

S

Steve

I posted this yesterday and got no responses, am trying again.

I have a report that prints a delivery ticket on page 1 (front) and a sales
contract on page 2 (back) when printed on a duplex printer. It works fine as
long as the number of items does not exceed 19 (the number printing on page
1). If there are more than 19 items nothing prints except page 1 and 2.
This is the code I finally got to work after help from several people here.
As you can see it is in the onformat of the PageHeader.

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)

If Me.Page Mod 2 = 1 Then
Me.Section(0).Visible = True 'This is Detail Section
Me.Section(1).Visible = True
Me.Section(2).Visible = True
Me.Section(3).Visible = False 'This is Page Header
Me.Section(3).Height = 1440 * 0.2
Me.SalesContract.Height = 1440 * 0.2
Me.Section(4).Visible = True 'This is Page Footer
Me.Section(5).Visible = True 'This is Group 0 Header

Else

Me.Section(3).Height = 1440 * 9.75
Me.SalesContract.Height = 1440 * 9.75

Me.Section(0).Visible = False 'This is Detail Section
Me.Section(1).Visible = False
Me.Section(2).Visible = False
Me.Section(3).Visible = True 'This is Page Header
Me.Section(4).Visible = False 'This is Page Footer
Me.Section(5).Visible = False 'This is Group 0 Header
End If
End Sub

Any help as to getting page 3 etc. to print will be appreciated.

TIA
Steve
 

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