SAP Knowledge Base Article - Public

1389444 - Paper orientation is wrong when printing after using the method ModifyUserPaperSize in Crytal Reports SDK

Symptom

Paper orientation is wrong when printing after using the method ModifyUserPaperSize in Crytal Reports SDK

Environment

  • SAP Crystal Reports 2008 .Net SDK
  • Visual Studio 2008

Reproducing the Issue

  1. Create a Crystal Report with Crystal Report 2008.
  2. Click file -> Page Setup, set paper A4, and landscape.
  3. Save the report.
  4. Change the paper size by SDK ModifyUserPaperSize() method, like ModifyUserPaperSize(8503, 11906), which width is set to be longer than height.
  5. Print this report by PrintToPrinter() method.

Cause

The orientation of the report is set to be landscape, when editing the paper by ModifyPaperSize() method, the report will be rotate 90 degree.

Resolution

  • Use the ModifyPaperOrientation() method before printing.
  • Change the orientation of the report in Crystal Report Designer.

Keywords

rotation; , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

Crystal Reports 2008 V1