- 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
- In Crystal Reports, create a report off any data source that contains data with trailing spaces
- 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
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:
As you notice, the trailing spaces are removed.
- Crystal Reports removes trailing spaces by default.
The following resolution involves editing the registry. Using Registry Editor incorrectly can cause serious problems that may require you to reinstall the Windows operating system. Use Registry Editor at your own risk. For Information on How to Edit the Registry Key View the Changing Keys And Values online Help topic in Registry Editor (Regedit.exe).It is strongly advised that you make a backup copy of the registry files before you edit the registry.
- In Crystal Reports, to keep the data trailing spaces, add the registry key: TrimTrailingSpace, and set the value to: No
- In MS Windows, go to the following path in the Microsoft Registry Editor.
- For Crystal Reports 2008 : HKLM\Software\Business Objects\Suite 12.0\Crystal Reports\DatabaseOptions
- For Crystal Reports 2011 : HKLM\Software\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions
- For Crystal Reports 2013 : HKLM\Software\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions
Trailing space removed, CR , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem