Symptom
- Trailing spaces are truncated when Crystal Report created using data from a notepad++ having space at the end is exported to text format.
- The truncated trailing spaces are displayed when the exported text format is opened with a notepad++.
Environment
Crystal Reports 2008
Reproducing the Issue
- In notepad++ enter a sentence like 'This line contains blank space at the end ' (leave space after the line).
- Enable 'Show all Characters' option from the toolbar in notepad++.
- In notepad++, go to File > Save and save the .txt file.
- Launch Crystal Reports designer.
- Create a blank report.
- In Database Expert > Create New Connection > Access/Excel(DAO).
- Under connection, in Database Type select Text.
- In Database Name browse the .txt file.
- Drag the text file in Selected Tables section and click OK.
- In Field explorer, drag the fields from the Database Fields to the Details section of the report.
- Refresh the Crystal Report.
- Go to File > Export > Export Report > in Format select Text > Click OK.
- Save the exported text file and open it with Notepad++.
Cause
Crystal Report removes trailing spaces by default.
Resolution
- Go to the Registry Editor (Start > Run > Type regedit) and navigate to the below folder:
HKey_current_user/Software/Business Objects/Suite 12.0/Crystal Reports/DatabaseOptions - Right Click on Database options > New String Value > name it as TrimTrailingSpace
- Select Modify > Set the value data to: No
Keywords
Crystal Reports, trailing spaces truncated. , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem
Product
Crystal Reports 2008 V0