Symptom
-
Page Orientation is being ignored while printing a report from Crystal Reports winform viewer.
-
Page orientation is set through Printer Preferences from windows print control.
Environment
-
Crystal Reports 2008
-
Visual Studio 2008
Reproducing the Issue
-
Preview a Crystal report in Crystal Reports winform viewer.
-
Click ‘Print’ button from viewer, windows print control appears.
-
Select the printer from the list.
-
Click ‘Preferences’.
-
Change the page orientation to Landscape.
-
Observe the printout, report gets printed as Portrait.
Cause
-
This is by design.
-
Same behavior is observed from Crystal Reports designer.
Resolution
-
In this scenario the solution is to handle the paper orientation through SDK code.
The entire printing scenario could be handled by implementing a custom print button using InProc RAS SDK. -
The sample code is provided in KB "1561333 using the InProc Report Application Server (RAS) SDK for .NET to print a report".
Keywords
KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , BI-RA-CRV , SAP Crystal Reports Viewer , Problem
Product
Crystal Reports 2008 V1