SAP Knowledge Base Article - Public

1364230 - Line and box objects in Crystal Report are not exported to MS Excel format

Symptom

  • Lines does not appear in MS Excel.
  • Boxes are missing when exporting a report to MS Excel format.
  • Lines and box in Crystal Reports are not exported to MS Excel format.
       
         
  • Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020
               
  • SAP Crystal Reports for Enterprise 4.1
  • SAP Crystal Reports for Enterprise 4.2
  • SAP Crystal Reports for Enterprise 4.3

Reproducing the Issue

  1. In Crystal Reports, create a report off any data source.
  2. Under the Insert menu, select Box or line object.
  3. Place the object it any section.
  4. Export the report to MS Excel (97-2003) format.
      
    Notice the box and lines are not exported to MS Excel.
     
    Export to MS Excel.png

Cause

  • Drawing objects: line and box, are not a supported feature when exporting to MS Excel format from Crystal Reports and Crystal Reports for Enterprise.
        
  • For a list of Crystal Reports features supported by exporting format, see the SAP Knowledge Base Article 1946358

Resolution

  • Depending on the report design, it is possible to workaround this product limitation by replacing the lines or box by a text object, and set the text object borders to either display a line or a box.
            
    1. Open your report in Crystal Reports.
       
    2. Delete the the line or box.
        
    3. Insert a text object at the same location.
         
    4. Format the text object to display a line or a box:
      • Right clicking on the object and selecting "Format Text...
      • In the "Format Editor", under the tab "Border", set the line style for to "Single":
      • For a line, set the "Bottom" option to single, or for vertical lines, set the "Left" option to "single"
      • For a box, set the "Left", Right", "Top", and "Bottom", to single.
          
    5. Click "OK" to accept the change.
          
    6. Now when exporting to MS Excel format, it will display a box or line.
      •     
           
  • Notes: 
    • Drawing objects: line and box, are the only objects that can go across sections. If the lines that existed on the report was crossing sections, replace the line by multiple text object, one text object per section the line was crossing.
              
    • A sample report demonstrating this workaround is available in the Attachments section of this Knowledge Base Article.

Keywords

limitation, box, line, Crystal Reports. , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020

Attachments

MS_Excel_Line_and_Box.rpt