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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.SelectPrinter headAche

Status
Not open for further replies.

mgkSHA

Programmer
Jul 12, 2002
126
0
0
US
I am hoping someone has had this problem before and can shed some light on this.

Via Vbscript I automate a bunch of Crystal operations (this is version 9). I have the name of a printer stored on a table and get all corresponding driver info and port info from the registry. I can assign the new printer fine. But, no matter what I try, I can not get the paper orientation to change. Here is the current code piece:

Set App = CreateObject("CrystalRuntime.Application.9")
Set Rept = App.OpenReport(fileName)

'** // continue with code to populate report, etc.
'** // there are three final output options, export
'** // to txt file and save as work fine.....

Rept.SelectPrinter toSplit(0),printerPath,toSplit(1)
Rept.PageSetup.PaperOrientation = crLandscape
Rept.printout False, 1

I have tried using numerical constants instead of the crLandscape(0,1,2, etc.) nothing seems to work. I always get a printout with standard portrait layout. Please help if anyone has any ideas.
 
Try changing this:
Rept.PageSetup.PaperOrientation = crLandscape

to:
Rept.PaperOrientation = crLandscape

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top