SAP Knowledge Base Article - Public

1442562 - After printing the a Crystal Report from MS Word, the page Orientation changes from Portrait to Landscape

Symptom

  • The page orientation changes from Landscape to Portrait after the report is printed from MS Word.
  • The page Orientation was set as First Page Landscape and the second page as Portrait and the report then exported to Word/RTF.
  • The export is correct in MS Word and also the print preview but the physical print out shows incorrect page orientation for the second page (as Landscape) instead as Portrait as set in Crystal Reports

Environment

  • Crystal Reports 2008 Service Pack 2
  • Microsoft Office 2007

Reproducing the Issue

  1. Create a new Blank report in Crystal using Xtreme Sample Database
  2. Insert an Image in the detail section which would fit on 1 page for Crystal when previewed
  3. Create a new subreport, add Region field in the detail section for subreport and add a record selection formula to limit the data displayed on one page.
  4. Now add the subreport to the Report Footer in Main report.
  5. Preview the report (correct output).
  6. Go to section expert on Main report, select the Report Footer>Paging Tab>Select the option for New Page Before and Orientation as Portrait.
  7. Now Preview and Save the report.
  8. Export this report to Microsoft Word
  9. Print this exported document

(Note: This can be eproduced without using a subreport or Image in the Crystal report)

Observation:

  • The actual print out shows both the pages as Landscape instead of printing the first Page as Landscape and second as Portrait.
  • The Orientation supplied for the Subreport is ignored while printing the exported word document
  • This issue is same if we export to RTF, Word Document 
  • The PDF export prints fine
  • A simple Word document which has Landscape as first page Orientation and Portrait as second prints absolutely correct.

 

Cause

This has been raised as a potential bug to Product Group under reference number ADAPT01382043 but has been rejected after investigation for the following reason:

In Crystal 2008, orientation can be set up in section expert for report header, page header, details, page footer, and report footer. But editable word exporter will get page orientation information from page setup and not from section expert.  Page setup window can be seen when right clicking  the mouse button on report - page setup is for physical printer indeed while paging tab of section expert is just for view. Page orientation is landscape for all pages when first page is landscape in page setup dialog window. Editable word exporter will write control character '\landscape' for every page. So the physical printer will print every page in landscape mode.

NOTE: The result is different form PDF because PDF is picture print, that is, it is 'What You See Is What You Get'.  

 

Resolution

This is the default behavior of the product.

Workaround1:

Export to PDF and Print

Workaround2:

  1. First print this file in virtual printer like Microsoft XPS document writer.
  2. Then the output file '*.XPS' can be printed in physical printer to get the required result.

Keywords

KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Bug Filed

Product

Crystal Reports 2008 V1