SAP Knowledge Base Article - Public

1201695 - Error: 'Cannot obtain error message from server.' when refreshing a report based of an Oracle Server Stored Procedure in Crystal Reports

Symptom

  • Error: Database Connector Error: 'Cannot obtain error message from server.'
  • Unable to create or refresh a report in Crystal Reports, based of a specific Oracle Stored Procedure.
  • When attempting to create a report of an Oracle Stored Procedure in Crystal Reports, it fails with the errors:
        
        "Failed to retrieve data from the database"
      
    Followed by:
      
        "Database Connector Error: Cannot obtain error message from server"

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
         
  • Oracle

Reproducing the Issue

  1. In Crystal Reports, open or create a report based of an ODBC connection to a specific Oracle Stored Procedure.
  2. When refreshing the report, it fails with the Database Connector Error: 'Cannot obtain error message from server.'

Cause

  • The specific Oracle Stored Procedure used was created using the Dynamic SQL method.
  • Dynamic SQL is an enhanced form of SQL that, unlike standard SQL, facilitates the automatic generation and execution of program statements.
  • Dynamic SQL does not allow the use of Strongly Bound Ref Cursors, which is a requirement to be able to report from a stored procedure.

Resolution

  • To be able to report from the Oracle Stored Procedure:
          
    1. Review the Stored Procedure code to ensure it meets all the Oracle Stored Procedure Requirements to be used in Crystal Reports as listed in the SAP Knowledge Base Article: 1181947 
                  
    2. Perform one of the following:
      • Update the Oracle Stored Procedure and use Static SQL, in which you can have a Strongly Bound Ref Cursor e.g %ROWTYPE; or
      • Use a Native Oracle connection instead of an ODBC connection.

Keywords

CR, ORA , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Bug Filed

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016