Question Changing Printer Orientation

arun.jan387

New member
Joined
Oct 7, 2010
Messages
1
Location
Coimbatore, India.
Programming Experience
Beginner
Hello,

I am developing a Project in VB.NET which involves lot of Reports to be generated. Some of them are to be printed in Portrait Mode and some in Landscape Mode. I am using a Windows Form on which I have included a Crystal Report Viewer.

I need to change the Orientation of the Printer depending on the report. I tried the following code to do it,

------------------------------------------------------------------------
DlgPrint.PrinterSettings.DefaultPageSettings.Landscape = blLandScapeMode
------------------------------------------------------------------------

where,
DlgPrint is the PrintDialog included in the Form and blLandScapeMode is a Boolean Variable.

Now when I tried to set the mode to Landscape, it worked out. But next time when I tried to set it to Portrait by setting blLandScapeMode to False, the report remains to display in Landscape Mode.

This is my problem and I request someone to help me on this.

Thank You.
 
Back
Top