Duplex Printing 2.

  • Thread starter Thread starter t-online news server
  • Start date Start date
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
 
I guess I'm a little confused. You say this only happens if an invoice has
only one page? I would expect it to happen every time an invoice has an odd
number of pages. If the report is a single report, how would the printer
driver know where the invoice breaks are? It should just print each
following page in front/back order until the job is done, regardless of
whether or not the current page starts a new invoice.

If this is the case, then I tried something that appears to work. You appear
have a "group header" to group on the customer for each invoice and it
appears that this section is set to give a page break before the section.
Create a group footer as well. Place a page break control in the section
footer. In the OnFormat event of the section footer use code similar to
this:

Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)
If Page Mod 2 <> 0 Then
Me.PageBreak1.Visible = True
Else
Me.PageBreak1.Visible = False
End If
End Sub

What this will do is force another page if the group doesn't end on an even
page number.
 
First of all, thank you for the solution!
but I wonder what is a PageBreak-Control, how to create this? Is it a
textbox?
Sorry, perhaps there is a simple answer

Thanks
Axel S.
 
A page break control is one of the controls on the toolbox, the same place you get
textboxes, labels, listboxes, etc. The symbol on the button for it is a partial "box/page"
on top and a partial "box/page" on the bottom with an arrow pointing to the gap between
them. If you hover the mouse pointer over it, it should say "page break".
 
I found it myself in meantime. I had to change the sizes of the footer, so
now the report is working. I thank you very much for your advice.

Have a nice day
Axel Seutemann

Another possibilty might be to print them one after another and create for
every Number a new Report. I just startes to try this. If you like you could
look at my new posting, there I have a new problem!
 
Back
Top