SAP Knowledge Base Article - Public

1284188 - Trailing blank spaces are removed from data in Crystal Reports


  • Blank spaces are removed to the right of fields.
  • Data trailing spaces trimmed.
  • Crystal Reports removes data trailing spaces. 


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

Reproducing the Issue

  1. In Crystal Reports, create a report off any data source that contains data with trailing spaces.
  2. When refreshing the report, notice the data trailing spaces are trimmed in Crystal Reports.

For example if we have the following value in the database padded with spaces to always store it with 10 characters

    • Car         
    • Bicycle    
    • Airplane  

The value: Car, has 3 characters and 7 white spaces. ( Highlighted in yellow are all the characters stored in the database )

In Crystal Reports, the data will look like:

    • Car
    • Bicycle
    • Airplane

As you notice, the trailing spaces are removed.


  • Crystal Reports removes trailing spaces by default.


  • In Crystal Reports, to keep the data trailing spaces, add the registry key: TrimTrailingSpace, and set the value to: No
    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 further information see the SAP Knowledge Base Article 1323322   
    1. Open the Microsoft Registry Editor ( regedit )   
    2. In the Microsoft Registry Editor, navigate to the following path:     
      • For 64 bit version of MS Windows:   
        HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions
      • For 32 bit version of MS Windows:       
        HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions     
    3. Add the STRING key: TrimTrailingSpace   
    4. Set the value to: No
    5. Restart Crystal Reports.    


Trailing space removed, CR , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem


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