SAP Knowledge Base Article - Public

1203739 - Crystal Reports does not preserve white spaces in XML data

Symptom

You create a report off a XML file which contains the attribute xml: space ="preserve" and the required white spaces are not preserved. 

Cause

This issue happens when you use XML connection associated to the schema file and using the ADO.NET(XML) connection or XML connection.

 

Crystal Reports trims trailing white spaces. In an XML data field that only contains white space all the spaces are removed. For example, an Indent field in the XML is used as a tab space. All the spaces in this Indent field are removed by Crystal Reports.

Resolution

This issue has been addressed by Fix Pack 3.5 and Service Pack 4 for Crystal Reports XI Release 2 and above.

 

A new string value called "TrimTrailingSpace" needs to be created under the DatabaseOptions registry key.

 

To edit the Registry, type regedt32 in the Run box of the Windows Start menu then:

  1. Open the following key 'HKEY_CURRENT_USER\Software\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions'.
  2. Create a new string value called TrimTrailingSpace.
  3. Right click on TrimTrailingSpace" and select "modify".
  4. Type "No" in the "Value data" field.
Please note that this solution has to be added to the registry after applying Crystal Release 2 with Fix Pack 3.4 or Service Pack 4 and above.
WARNING:

The above-mentioned resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems that may require you to reinstall the Microsoft Windows operating system. Please back up the registry prior to making any changes.

Keywords

XML, ADO.NET, white spaces, preserve, space, XSD , 7063345, ADAPT00916523, 00916523, 916523 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Bug Filed

Product

Crystal Reports 2008 V0 ; Crystal Reports 2008 V1 ; SAP Crystal Reports XI ; SAP Crystal Reports XI R2