report, special duplex printing

  • Thread starter t-online news server
  • Start date
T

t-online news server

Hi there!
I'm using a report for printing all bills from all clients, one after
another. I use a Laserjet Duplex-Printer. The Invoices need from 1 Page to
perhaps 5 or 16 Pages, which I don't know in advance. If the bill needs just
one page, the following bill will be printed on the backside of the previous
one. So what I need is a blank page for that.

I have a little code for the page-number setup:
Private Sub Seitenfuß_Format(Cancel As Integer, FormatCount As Integer)
Dim I As Integer
If Me.Pages = 0 Then
ReDim Preserve GrpArrayPage(Me.Page + 1)
ReDim Preserve GrpArrayPages(Me.Page + 1)
GrpNameCurrent = Me!PAT_CODE
If GrpNameCurrent = GrpNamePrevious Then
GrpArrayPage(Me.Page) = GrpArrayPage(Me.Page - 1) + 1
GrpPages = GrpArrayPage(Me.Page)
For I = Me.Page - ((GrpPages) - 1) To Me.Page
GrpArrayPages(I) = GrpPages
Next I
Else
GrpPage = 1
GrpArrayPage(Me.Page) = GrpPage
GrpArrayPages(Me.Page) = GrpPage
End If
Else
Me!ctlGrpPages = "Seite " & GrpArrayPage(Me.Page) & " von " &
GrpArrayPages(Me.Page)
'Me!ctlSZ = GrpArrayPage(Me.Page)
End If
GrpNamePrevious = GrpNameCurrent
End Sub

So I tried to compare my own Page-No. from above with the real Page-No. of
the Report, to use the forceNewPage function, which doesn't work.

Has anyone an idea?

I would be very lucky for every kind of solution.

Greetings
Axel Seutemann
 
A

Alphonse Giambrone

Place a page break control at the end of the group footer section.
In the format event of the group footer

If Me.Page Mod 2 <> 0 Then
Me!YourPageBreak.Visible = True
Else
Me!YourPageBreak.Visible = False
End If

Make sure the height of the group footer is not zero.
 
T

t-online news server

How to make a Page break control?
your code would just do a blank page if the page is odd or even doesn't it?

Thanks for your advice
a. seutemann
 
T

t-online news server

t-online news server said:
Hi there!
I'm using a report for printing all bills from all clients, one after
another. I use a Laserjet Duplex-Printer. The Invoices need from 1 Page to
perhaps 5 or 16 Pages, which I don't know in advance. If the bill needs just
one page, the following bill will be printed on the backside of the previous
one. So what I need is a blank page for that.

I have a little code for the page-number setup:
Private Sub Seitenfuß_Format(Cancel As Integer, FormatCount As Integer)
Dim I As Integer
If Me.Pages = 0 Then
ReDim Preserve GrpArrayPage(Me.Page + 1)
ReDim Preserve GrpArrayPages(Me.Page + 1)
GrpNameCurrent = Me!PAT_CODE
If GrpNameCurrent = GrpNamePrevious Then
GrpArrayPage(Me.Page) = GrpArrayPage(Me.Page - 1) + 1
GrpPages = GrpArrayPage(Me.Page)
For I = Me.Page - ((GrpPages) - 1) To Me.Page
GrpArrayPages(I) = GrpPages
Next I
Else
GrpPage = 1
GrpArrayPage(Me.Page) = GrpPage
GrpArrayPages(Me.Page) = GrpPage
End If
Else
Me!ctlGrpPages = "Seite " & GrpArrayPage(Me.Page) & " von " &
GrpArrayPages(Me.Page)
'Me!ctlSZ = GrpArrayPage(Me.Page)
End If
GrpNamePrevious = GrpNameCurrent
End Sub

So I tried to compare my own Page-No. from above with the real Page-No. of
the Report, to use the forceNewPage function, which doesn't work.

Has anyone an idea?

I would be very lucky for every kind of solution.

Greetings
Axel Seutemann
 
A

Alphonse Giambrone

Drag it from the toolbox.
If the group footer is on an odd page a blank page will be added (an even
numbered page) so that the next group starts on an odd page.
 

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