Symptom
- Blank spaces are removed to the right of fields.
- Data trailing spaces trimmed.
- Crystal Reports removes data trailing spaces.
Environment
- SAP Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
Reproducing the Issue
- In Crystal Reports, create a report off any data source that contains data with trailing spaces.
- 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.
Cause
- Crystal Reports removes trailing spaces by default.
Resolution
- 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
- Open the Microsoft Registry Editor ( regedit )
- 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
- Add the STRING key: TrimTrailingSpace
- Set the value to: No
- Restart Crystal Reports.
Keywords
Trailing space removed, CR , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem
Product
Crystal Reports 2008 V0 ; Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013
Attachments
TrimTrailingSpace.bmp |