SAP Knowledge Base Article - Public

1484324 - PrintToPrinter API causes print page orientation swaps in .NET with custom paper size

Symptom

  • The printout is cut off when using PrintToPrinter API to print the report
  • Width and height measurements of the printout are swapped when using PrintToPrinter API to print the report
  • The report is correctly printed out via Crystal Reports Designer or using Print button on CrystalReportViewer

Environment

  • Crystal Reports 2008 SP2
  • Crystal Reports 2008 SP3

Reproducing the Issue

  1. Create a custom paper size form
  2. Design a report based on the above custom paper size. Printing the report in Crystal Reports Designer works as expected
  3. Create a VS.NET application using CR2008 .NET SDK to display the above Crystal Report. Printing the report via Print button on CrystalReportViewer works as expected
  4. In .NET application, using PrintToPrinter() API to print out the same report.
  5. The printout is cut off, or the width and height measurements of the printout are swapped.

Cause

The issue has been identified and logged under Problem Report ID ADAPT01383393.

Resolution

This issue is scheduled to be addressed in Crystal Reports 2008 SP2 FP8, or SP3 FP1, or SP4.

Update: This has been resolved for paper sizes where length is the same as but not less than width. However the issue still occurs when length is less than width (Example: label printer 4 inches wide by 2 inches high), therefore a new Adapt - ADAPT01083203 was raised.

See Also

Keywords

KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Bug Filed

Product

Crystal Reports 2008 V1