SAP Knowledge Base Article - Public

2153347 - RTF Text truncated on the left when exporting to RTF format from Crystal Reports

Symptom

  • Text truncated on the left.
  • Text displayed in a table format is missing the first character of each line when exported.
  • Some Text formatted using RTF Text Interpretation in Crystal Reports, is truncated when exporting the report to RTF format.

Environment

  • 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.
       
  2. Create a formula with RTF tags that create a table using the RTF Tag: \trowd
       
    For example, the RTF tags below create a table with 2 rows and 3 columns:
      
         "{\rtf1\ansi\deff0\trowd\trgaph144 "+
         "\clbrdrt\brdrs\clbrdrl\brdrs\clbrdrb\brdrs\clbrdrr\brdrs\cellx1000"+
         "\clbrdrt\brdrs\clbrdrl\brdrs\clbrdrb\brdrs\clbrdrr\brdrs\cellx2000"+
         "\clbrdrt\brdrs\clbrdrl\brdrs\clbrdrb\brdrs\clbrdrr\brdrs\cellx3000 "+
         "cell 1-1\intbl\cell cell 1-2\intbl\cell cell 1-3\intbl\cell \row\trowd\trgaph144"+
         "\clbrdrt\brdrs\clbrdrl\brdrs\clbrdrb\brdrs\clbrdrr\brdrs\cellx1000 "+
         "\clbrdrt\brdrs\clbrdrl\brdrs\clbrdrb\brdrs\clbrdrr\brdrs\cellx2000 "+
         "\clbrdrt\brdrs\clbrdrl\brdrs\clbrdrb\brdrs\clbrdrr\brdrs\cellx3000 "+
         "cell 2-1\intbl\cell cell 2-2 \intbl\cell cell 2-3\intbl\cell\row }" 
      
  3. Insert the formula on the report.
      
  4. Set the formula to interpret the RTF tags, by changing the formatting option "Text Interpretation" to: "RTF Text"
      
  5. When viewing the report, it does not display the table, but displays the text like a table:
     
      RTF Tags - 01.png   
      
  6. Export the report to RTF format from Crystal Reports.
       
  7. When viewing the exported document in MS Words, notice the text on the left is truncated.
     
    RTF Tags - 02.png

Cause

  • Crystal Reports does not support the RTF tag: \trowd that creates a table, and this is why:
    • The text does not display as a table in Crystal Reports, and
    • The text is truncated when exporting the report to RTF format, and MS Words format.
         
  • For a list of supported RTF tags to format text in Crystal Reports, see the SAP Knowledge Base Article:
       
           1214798 - What RTF tags are supported in Crystal Reports?

Resolution

  • Remove the unsupported RTF tags associated with table formatting: \trowd , as Crystal Reports only support few RTF tags for text formatting only. 
        
  • If the RTF formatting is stored in a database, ask your database administrator:
    • If there is a database field that contains the same information in plain text that you can use on the report;
    • If there is no database field that contains the same data in plain text, then ask if it is possible to store the information in the database without RTF formatting, or with only RTF tags formatting that is supported in Crystal Reports RTF Text Interpretation, which are listed in the SAP Knowledge Base Article: 1214798

Keywords

CR, txt, RTF text interpretation, truncate , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

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