| Charles A. Lackman 2005-05-25, 8:58 pm |
| Hello,
First you need to get the number of pages you are printing:
The Following Imports may be necessary:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Dim NumberOfCopies as Integer = 1
Dim AnInteger as Integer
AnInteger = Report.formatengine.getlastpagenumber(New
ReportPageRequestContext)
Then you can test to see if the value is even or odd, once the value has
been determined even or odd then send only the even to the printer
For X = 1 to AnInteger
If AnInteger = Even then (Add your code to test if odd or even)
MyCrystalReport.printtoprinter(NumberOfCopies, True, AnInteger, AnInteger)
End If
Next
After the even pages are printed create a MessageBox to have the user turn
the pages over and print only the odd pages
For X = 1 to AnInteger
if AnInteger = Odd then (Add your code to test if odd or even)
MyCrystalReport.printtoprinter(NumberOfCopies, True, AnInteger, AnInteger)
End If
Next
You might have to reverse the print order for the other side:
For X = AnInteger to 1 Step -1
Next
OR using STEP might simplify this process. IE.
FOR ODD
For X = 1 to AnInteger STEP 2
MyCrystalReport.printtoprinter(NumberOfCopies, True, AnInteger, AnInteger)
Next
FOR EVEN
For X = 2 to AnInteger STEP 2
MyCrystalReport.printtoprinter(NumberOfCopies, True, AnInteger, AnInteger)
Next
You will have to Experiment. Hope this helps,
Chuck
"Ken" <ken1239@hotmail.com> wrote in message
news:uxYc3XOXFHA.2124@TK2MSFTNGP14.phx.gbl...
Hi all,
Can anyone tell me how to control crystal report to print even number of
pages for each group as I am creating a report to generate multiple clients
information and want it to print out double side on each paper.
|