SAP Knowledge Base Article - Public

2318036 - Lines disappears when exporting a report to PDF format from Crystal Reports

Symptom

  • Some Lines disappears.
  • Lines displays and disappears when zooming in and out of a PDF document created by Crystal Reports.
  • On a report where lines are drew beside text object or database fields, the lines does not always displays in the PDF document generated by Crystal Reports.

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 based on any data sources.
  2. Insert a database field or a text object in the Details section of the report.
  3. Format the field to display a background color.
  4. Add a line above or below the field.
  5. Export the report to PDF format.
     
    When opening the exported PDF document, some lines are hidden, or not displayed fully.
     
    Lines Disappears.png

Cause

  • Lines and Box in Crystal Reports does not have the functionalities to be displayed at a different layer level, and therefore it always displays in the background.
           
  • When exporting a report to PDF format that contains Lines drew right on the edge of a Text Object or Database Field, it is not possible to set the line to display in the front of an object because this properties does not exist for a Line, therefore it always display it in the background, which causes the generated PDF document to not enterly or partly display the lines because it is under the Text Object or Database Field.

Resolution

  • Replace the Line by a Text Object, with the top border displayed as a single line, and the text object set to display on the top layer. 
    The Text Object will now look like a single line. To do so, follow the steps below:
            
    1. Open the report in Crystal Reports designer.
       
    2. Wherever there is a line, delete the line and insert a Text Object with no text inside.
       
    3. Right click on the Text Object, and select "Format Text..."
        
    4. In the "Format Editor", under the tab "Border", set the Top to display a Single line, and click "OK"
       
      Top Line.png  
          
       
    5. Right click on the Text Object, and select "Move - To Front"   
      Note: If it is already in front, the option will not be avaible, so it will display in front of other objects.
            
    6. Move the Text Object to display where you want on the report.
          
    7. Export the report to PDF format.
          
      Now, the lines will display as expected in the generated PDF document.
        
         
  • Sample report demonstrating the above technique is available in the Attachment section under the name: Exporting Lines to PDF.rpt 

Keywords

CR, Lines not showing, Adobe PDF , 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

Exporting Lines to PDF.rpt