Connecting Tech Pros Worldwide Forums | Help | Site Map

Print even number of pages

Expert
 
Join Date: Nov 2006
Location: Andover, Hants, UK
Posts: 215
#1: Mar 6 '07
Hi
I need to print a report which will always output an even number of pages (this is for duplex printing).
ie, if the report ends with an odd number of pages, I need to output a blank sheet...

I've tried playing with 'Page' and 'Pages', but no luck!
Anyone know of a quick/dirty way of doing this?

All help gratefully received
TIA
Steve

Rabbit's Avatar
Expert
 
Join Date: Jan 2007
Location: California
Posts: 3,835
#2: Mar 6 '07

re: Print even number of pages


Why would you need that?
Expert
 
Join Date: Nov 2006
Location: Andover, Hants, UK
Posts: 215
#3: Mar 6 '07

re: Print even number of pages


Client requirement!!!!!!!!! <G>

Steve
Rabbit's Avatar
Expert
 
Join Date: Jan 2007
Location: California
Posts: 3,835
#4: Mar 6 '07

re: Print even number of pages


What I meant was that there's no point in printing a blank page at the end of the report. Whether or not you do this the results are the same, you get one sheet with printing only on one side.
Rabbit's Avatar
Expert
 
Join Date: Jan 2007
Location: California
Posts: 3,835
#5: Mar 6 '07

re: Print even number of pages


Unless you need to print multiple copies, in which case I don't know how that works in duplex printing. If this is the case, try printing two copies and see if you have to go through the trouble of printing a blank page. Because I suspect it may be the case that you won't have to print a blank page.
Expert
 
Join Date: Nov 2006
Location: Andover, Hants, UK
Posts: 215
#6: Mar 6 '07

re: Print even number of pages


Hi, Rabbit

Sorry if I haven't made myself clear as to the reason for my post...
I need an even number of sheets because this report will be printed DUPLEX (ie, both sides)
Clearly, if there is an odd number of sheets (and this includes the number of sheets for each group break), the duplex printing of the back side will not be in sync with the numbering of the front.

HTH
Steve
Rabbit's Avatar
Expert
 
Join Date: Jan 2007
Location: California
Posts: 3,835
#7: Mar 6 '07

re: Print even number of pages


Quote:

Originally Posted by cyberdwarf

Hi, Rabbit

Sorry if I haven't made myself clear as to the reason for my post...
I need an even number of sheets because this report will be printed DUPLEX (ie, both sides)
Clearly, if there is an odd number of sheets (and this includes the number of sheets for each group break), the duplex printing of the back side will not be in sync with the numbering of the front.

HTH
Steve

I understand what duplex printing is. What I don't understand is why this is a problem if you're only printing one copy. Like I mentioned previously, it might be a problem if you print more than one copy. But I can not be sure of this. Have you tried to print more than one copy so that you know this to be a problem?

I don't understand what you mean by "the duplex printing on the back side will not be in sync with the numbering on the front."
ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,218
#8: Mar 6 '07

re: Print even number of pages


Quote:

Originally Posted by cyberdwarf

Hi
I need to print a report which will always output an even number of pages (this is for duplex printing).
ie, if the report ends with an odd number of pages, I need to output a blank sheet...

I've tried playing with 'Page' and 'Pages', but no luck!
Anyone know of a quick/dirty way of doing this?

All help gratefully received
TIA
Steve

To Print only the Even Pages of a Report, place this single line of code in the Print() Event of any Section that is printable. For instance in this test Report, the Report's Header, Detail, and Footer Sections will be printed.
Expand|Select|Wrap|Line Numbers
  1. Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
  2.   If Me.Page Mod 2 = 1 Then Cancel = True
  3. End Sub
Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
  2.   If Me.Page Mod 2 = 1 Then Cancel = True
  3. End Sub
Expand|Select|Wrap|Line Numbers
  1. Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
  2.   If Me.Page Mod 2 = 1 Then Cancel = True
  3. End Sub
Rabbit's Avatar
Expert
 
Join Date: Jan 2007
Location: California
Posts: 3,835
#9: Mar 6 '07

re: Print even number of pages


That's not what they want. They want to print an extra blank page at the end if the report turns out to be an odd amount of pages.
Reply