SAP Knowledge Base Article - Public

3297626 - Pictures blank on report connecting to DB2 via an ODBC connection in Crystal Reports

Symptom

  • Blank images.
  • Pictures stored in blob field in the DB2 database are not displayed in Crystal Reports 2020.
  • When viewing the same report in Crystal Reports 2016, it displays the images.
  • When viewing a report connecting to IBM DB2 11.5 via an ODBC connection in Crystal Reports 2020, the pictures stored in the database are not displayed. 

Environment

  • SAP Crystal Reports 2020
       
  • IBM DB2 11.1 and 11.5  

Reproducing the Issue

  1. Install and configure the 64bit IBM DB2 Client 11.1 or 11.5
  2. In the 64bit Microsoft ODBC Data Source Administrator, create an ODBC DSN to IBM DB2 using the IBM DB2 ODBC driver.
  3. In Crystal Reports 2020, create, or open a report based on the ODBC connection to IBM DB2.
  4. Notice the images are all blank on the report. 

    Note the issue is reported and verified on versions 11.1 and 11.5 but may also exist on versions in between.  If experiencing the issue, follow the resolution steps to verify if it is the same problem.

Cause

  • Pictures are not displayed on the report because the IBM DB2 ODBC driver used to connect to the database is not sending the right data type for the blob field to Crystal Reports 2020.
         
  • The IBM DB2 ODBC driver is sending the incorrect data type: String[65534], instead of: Picture.

Resolution

  • Connect to the database in Crystal Reports 2020 using a direct connection to IBM DB2, and it will display the pictures. 
  • To update existing reports to use a direct connection to IBM DB2, perform a set data source location.
      
    1. In Crystal Reports 2020, open the report.
    2. Under the menu "Database", select "Set Datasource Location..."
    3. In "Set Datasource Location", in the section "Replace with", expand "Create New Connection"
    4. Under "Create New Connection", double click on DB2 Unicode
    5. Enter the IBM DB2 server information, and database user name and password.
    6. Once connected, select the IBM DB2 connection in the Replace with section.
    7. Then select the ODBC connection to DB2 in the "Current Data Source" section.
    8. Click on the button "Update"
    9. Click "Close"
    10. Save the report.

Keywords

CR, DB2, blob image , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2020