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
- In Crystal Reports, open or create a report based of an ODBC connection to a specific Oracle Stored Procedure.
- 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:
- 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
- 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