473,666 Members | 2,138 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print even number of pages

218 Recognized Expert New Member
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
Mar 6 '07 #1
8 3706
Rabbit
12,516 Recognized Expert Moderator MVP
Why would you need that?
Mar 6 '07 #2
cyberdwarf
218 Recognized Expert New Member
Client requirement!!!! !!!!! <G>

Steve
Mar 6 '07 #3
Rabbit
12,516 Recognized Expert Moderator MVP
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.
Mar 6 '07 #4
Rabbit
12,516 Recognized Expert Moderator MVP
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.
Mar 6 '07 #5
cyberdwarf
218 Recognized Expert New Member
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
Mar 6 '07 #6
Rabbit
12,516 Recognized Expert Moderator MVP
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."
Mar 6 '07 #7
ADezii
8,834 Recognized Expert Expert
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
Mar 6 '07 #8
Rabbit
12,516 Recognized Expert Moderator MVP
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.
Mar 6 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

14
2904
by: Marcin Ciura | last post by:
Here is a pre-PEP about print that I wrote recently. Please let me know what is the community's opinion on it. Cheers, Marcin PEP: XXX Title: Print Without Intervening Space Version: $Revision: 0.0 $
1
5233
by: Benjamin | last post by:
I have a weird behavior occuring in IE 6.0. I am trying to use HTML to display documents to a user, but then also have it sent directly to the printer and have it look similiar (I know probably not the best way to do it). If I have multiple pages, everything works just fine. For some reason that I can't figure out, when I only have a single page, IE when it goes to print (print preview included), will add a second blank page, regardless...
0
1718
by: Dmitry Akselrod | last post by:
Hello Everyone, I have an almost well working Print Queue Monitoring software written. The software works quite well with typical Windows printing situations. However, there's a problem when a job is submitted to a print queue via LPD printing. I have a couple of server with Print Services for Unix installed (Windows 2000 SP4+). These servers are able to receive print jobs as Unix-type LPD print queue. Whenever a job is submitted...
10
1761
by: MLH | last post by:
If I wanted 2 of each page, could I make them print out 2 of first page, 2 of second page, 2 of third page, 2 of fourth page and 2 of 5th page? Or, do I have to run the openreport method twice which, of course, gives me 2 stacks containing pages 1-5 each?
6
1876
by: Jeff Thies | last post by:
I have a club newsletter that is currently distributed as a PDF. I'm considering converting this to html... Several problems ensue. 1) PDF's can be formatted for a page to fit on a sheet of 8.5 * 11 paper. I'm not sure how to this in HTML. 2) A PDF can be set to print all pages. I'm not sure how to do this with html either. Suggesting page breaks (in CSS) and having this as a single
0
1013
by: Phil | last post by:
When I print an aspx page built in Asp.Net 2.0 (c# - Visual Studios 2005) the resulting print page is cut-off. Anything that spans too far to the right, or to far down is clipped - multiple pages are not printed. Using print preview displays the same result (clipped pages - no multiple pages). In fire Firefox the result is simply one page with as much will fit on it. In IE 6 it prints three total pages. The first page is blank with the...
6
5165
by: Greg Esres | last post by:
I have some text lines to print that are much longer than the width of the paper, maybe as much as 6 times. For a given page, I'd like everything that doesn't fit to print on a second page, and whatever doesn't fit there to go on a third page, etc, so that I can piece together the final output by laying the pages side by side. Things that don't work well: 1) Breaking up the line into sections of a given # of characters. Problem with...
1
5069
by: rakesh kakarla | last post by:
Hey guys, Does anyone of you know how to count the number of pages that A HTML page would print. My objective is to count the number of pages in an HTML page using javascript. my application cannot use the WINDOWS PRINT PREVIEW element.? thank you Rakesh
0
1021
by: deve8ore | last post by:
Hello, I have a workbook with ~ 20 sheets, all which upload with different data every week. We have some "old school" managers that are still requesting hard copies of each sheet.... problem for me is that the ranges per sheet can change dramatically (I.e. - from (A1:D20) to (C1:Z490). So far I've tried to create print ranges based on the number of cell functions, and try to print, however the font in some pages can be very small... some...
0
8445
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.