Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting a different tray to print from through CR and VB

CR Printer Dialog Box

Selecting a different tray to print from through CR and VB

by  bburnell  Posted    (Edited  )

[color blue]*NOTE* MyRpt is generic for your instance of the CR report you wish to print from.[/color]

To set CR to print to the tray that is the printer default you do this:

[color red]MyRpt.PaperSource = Printer.PaperBin[/color]

[color blue]*NOTE* Printer.PaperBin is usually 7 (Auto Select) by default.[/color]


You can also set papersource to the following properties (a full list is at the bottom):
Auto Select = 7 (or) crPRBinAuto
Upper Tray = 1 (or) crPRBinUpper
Lower Tray = 2 (or) crPRBinLower
Middle Tray = 3 (or) crPRBinMiddle
Manual Feed = 4 (or) crPRBinManual

An example to print to the middle tray would be:
[color red]MyRpt.PaperSource = 3[/color]
-or-
[color red]MyRpt.PaperSource = crPRBinMiddle[/color]

Check out these 2 links from Crystal Decision's Knowledge Base for more details:
http://support.crystaldecisions.com/library/kbase/articles/c2007185.asp
http://support.crystaldecisions.com/library/kbase/articles/c2010249.asp


The following is very important!
"If the SelectPrinter method of the Report object is being used to change the printer for the report, the 'PaperOrientation' and 'PaperSource' properties must be set after invoking the SelectPrinter method. If the 'PaperOrientation' or 'PaperSource' property is set before the SelectPrinter method, then paper tray or orientation settings are overwritten with the new printer's settings."


Here are all the codes:
[color green]crPRBinUpper - 1
crPRBinLower - 2
crPRBinMiddle - 3
crPRBinManual - 4
crPRBinEnvelope - 5
crPRBinEnvManual - 6
crPRBinAuto - 7
crPRBinTractor - 8
crPRBinSmallFmt - 9
crPRBinLargeFmt - 10
crPRBinLargeCapacity - 11
crPRBinCassette - 14
crPRBinFormSource - 15[/color]

[color blue]*NOTE* There is no 12 or 13.[/color]


I was emailed this question and I'm currently doing it for work. I thought I would share the information. :)
Brett (smsforce)
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top