SAP Knowledge Base Article - Public

1214490 - Extra values are exported to Excel, CSV or Text from Crystal Reports

Symptom

  • Extra values appears in the exported file.
  • When exporting a report to MS Excel, CSV or Text format, and the exported file is viewed, extra values are visible that do not appear on the report in Crystal Reports designer.
  • Why do these extra values appear in the exported file and how can they be prevented from appearing?

Environment

  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016

Reproducing the Issue

  1. Open a report in Crystal Reports designer.
  2. View the report, and notice what it displays.
  3. Export the report to MS Excel format.
        
    Notice it displays more data, than on the report.

Cause

  • These values appear in the exported file because, even though they are not visible on the report, they exist on the report. They are not visible on the report because they are outside the page margins of the report as specified when the report was created.
         
  • Values can be outside the report page margins if:
    • Fields are inserted onto the report to the right of the page margin.
    • The report is created with a page orientation of Landscape and is then reformatted to have a page orientation of Portrait.
         
  • Fields outside the page margins are not visible when previewing a report but still exist on the report. When the report is exported, Crystal Reports includes these fields in the exported data and they appear as extra values in the exported file.
        
  • This behavior is by design. The exporting driver export all unsuppressed fields of the report, regardless of whether or not they are within the page margins.

Resolution

  • To prevent extra values from appearing in the exported file, suppress or delete any fields outside the page margins prior to exporting the report. This way, Crystal Reports only exports visible fields.
     
    Note: On the report, you can check whether fields are outside the page margins by clicking the 'Design' tab and then clicking '50%' in the 'Zoom Control' box. Doing this allows you to see if any fields print outside the page margins.

Keywords

CSV EXPORTING NEW VALUES EXTRA VALUES EXCEL TEXT PAGINATED TEXT Crystal Reports Exporting Extra Values Page Margins , c2011000 , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016