- Error: 'Failed to open the connection.'
- Refreshing a report generate the error.
- When attempting to refresh a report based of a Universe in Crystal Reports, it fails with the following error:
- "Failed to open the connection.
- Details: Update of the SQL command from the Universe failed.
- This report cannot be refreshed unless the SQL command is updated from the Universe."
- The same report used to refresh successfully before the Universe was modified.
- SAP Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
Reproducing the Issue
- In Crystal Reports, create a report off a Universe.
- Add some dimensions to the report.
- Save the report.
- In the Universe Designer, hide all the dimensions used on the report
- Save the Universe and export it back to the repository
- In Crystal Reports, when attempting to refresh or open the report based of the Universe, it generates the following error:
- This situation arise when the Universe is modified and all the objects used on the report have been hidden or removed from the Universe.
- This is unfortunately a normal behavior since the report no longer have any objects to report from, and the Web Intelligence Report Server which provide the SQL Query to Crystal Reports, has nothing to provide, and therefore it generate the error: Failed to open the connection.
- Un-hide from the Universe at least one of the object used by the report; or
- Perform a set location from the current Universe to the same or a different Universe and add at least one object in the Query Panel
- Open the report based of the Universe in Crystal Reports
- Under the menu: Database, select: Set Data Source Location...
- In the Set Datasource Location window, open a connection to the same or a different Universe that contains object you want to have on the report.
- In the Business Objects Query Panel, add the objects you want to add to the report, and click: OK
- Back to the Set Datasource location window, click on the: Update button.
- The Map Fiels window will display. Click: OK
- Back to the Set Datasource Location window, click: Close
- Add the object to the report.
Performing one of the above will provide at least one object from the Universe that the Web Intelligence Report Server can use to generate the connection string and SQL Query that will be send to Crystal Reports to execute.
CR , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem
Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016