SAP Knowledge Base Article - Public

1219319 - Blank line appears at the end of a generated file, when exporting a report to text from Crystal Reports

Symptom

  • Blank line at the end of the generated text file.
  • A blank line appears at the end of the text file when a report is exported to text format from Crystal Reports.
  • This blank line can be disruptive to applications that are parsing the text file for data.

Environment

  • SAP Crystal Reports 2020
  • SAP Crystal Reports 2025

Resolution

  • Set the registry:SuppressTrailingNewlines, the value: 1 to remove blank line at the end of the text file.

    WARNING The following resolution involves editing the Microsoft Registry. Using the Microsoft Registry Editor incorrectly can cause serious problems. Use the Microsoft Registry Editor at your own risk. For more information see the SAP Knowledge Base Article 1323322 

    1. Open the Microsoft Registry Editor.
      (In Microsoft Windows, under the menu Start, select Run, and type: regedit) 
          
    2. In the Microsoft Registry Editor, navigate to the path

      HKEY_CURRENT_USER\Software\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Export\Text

    3. Add the DWORD value: SuppressTrailingNewlines

    4. Set the value to: 1

      Note: The default value of this registry key is 0 (default behavior). When the registrykey is given the value of 1, blank lines won't appear at the end of a text export. The final character of data in a text file marks the end of the text file.

Keywords

CR, export, text, blank line , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2020 ; SAP Crystal Reports 2025