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!

Hoe can I set Printer Orientation for Crystal report from VB?

Status
Not open for further replies.

denko

Programmer
May 17, 2001
70
0
0
US
Is there a way to set Printer Orientation for a Crystal report from VB. My default orientation for printer set to Portrait but report should print in Landscape. On some printers in does not work and want to force Crystal to change orientation from Vb code?
Thanks
 

There is a FAQ in one of the Crystal forums that outlines how to set printer properties:

faq149-346

Mark
 
so easy
mycrystalreport.PaperOrientation=crDefaultPaperOrientation
=crLandscape
=crPortrait

but be carefull to add referance to your project

"crystal report activex designer design and runtime librery"
 
Unfortunately, I'm using CR6 and PaperOrientation is not one of the properties for CR object. Vb produces an error -Object does not support this property or method.
Does anyone know maybe it's possible to download those dlls to make Orientation property available?

Thanks
 
Have you tried to change it using Printer object property?
 
Yes but it does not work in my case, any other ideas?
Thanks
 
the other ideas
-recreat your report using crystal report activex designer.
-or in cr6 create 2 reports one in landscape and one in Portrait then switch between those two reports as it is required.

but this should not stop you keep searching for set Orientation from vb code.

regards
 
denko What do you mean saying Printer object did not work in your case?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top