SAP Knowledge Base Article - Public

1347081 - Chinese characters show as squares when exporting a report to PDF from Crystal Reports

Symptom

  • Incorrect characters.
  • Chinese characters shows as boxes.
  • Chinese words show as empty square boxes (口) when exporting a report to PDF from Crystal Reports.

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020
         
  • SAP BusinessObjects Business Intelligence platform 4.1
  • SAP BusinessObjects Business Intelligence platform 4.2
  • SAP BusinessObjects Business Intelligence platform 4.3

Reproducing the Issue

  1. In Crystal Reports, create a report based on any data source.
  2. Insert at least one Database Fields containing Chinese characters, or insert a Text Object and enter Chinese characters.
  3. Export the report to PDF format.
  4. When opening the generated PDF document, notice the place where it should have Chinese characters, it displays empty square boxes.

Cause

  • The font used to format the Database Fields, or Text Object, does not contain Chinese characters, and this is why it is showing square boxes in the PDF document.
         
  • For example: The Arial font does not contain Chinese characters, and therefore when used, it will show empty square boxes.
       
  • If you want to verify the font used to format the field contains Chinese characters, use the MS Windows application:
       
    1. In MS Windows, search for the application: Character Map  
    2. In Character Map, select the font: Arial  
    3. Scroll the list of characters, and notice the Arial font does not contains any Chinese characters. 
        
       Charcter Map - Arial.png  

      And this is why it shows empty square boxes in the PDF document, because the font does not contain Chinese characters.
            
    4. Select a different font, like: SimSun    
    5. Scroll through the characters, and you will see this font contains Chinese characters.

        Charcter Map - SimSun.png

      This is one example of a a font that can be used to display Chinese characters.  

Resolution

  • Update the font used to format the Database Fields, or Text Object to a font that contains Chinese characters, like: SimSun, SimHei,...
       
    1. In Crystal Reports, open the report.
        
    2. Right click on the Database Field, or Text Object, and select "Format Field... " or "Format Text..."
        
    3. In the Format Editor, under the tab "Font", select a font that contains Chinese characters, like: SimSun, SimHei, ...
       
      Note: If fonts like: SimSun, SimHei, does not exist on your computer, you will have to install the fonts in MS Windows.
         
    4. Click "OK" to accept the change.
        
    5. Save the report.
          
         
  • Note: When exporting a report to PDF format from SAP BI LaunchPad, it will embed the font in the PDF document that exist on the server, therefore it is required the font used for formatting the objects to be installed on the server, otherwise it will substitute the font with another one, and it will either display incorrect characters, or blank square boxes.

Keywords

Verdana Arial garbled massy code , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , BI-BIP-ADM , BI Servers, security, Crystal Reports in Launchpad , Problem

Product

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