SAP Knowledge Base Article - Public

1706725 - Error: 'Failed to open the connection', when refreshing a report based of a Universe in Crystal Reports

Symptom

  • 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.

Environment

  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016

Reproducing the Issue

  1. In Crystal Reports, create a report off a Universe.
  2. Add some dimensions to the report.
  3. Save the report.
  4. In the Universe Designer, hide all the dimensions used on the report
  5. Save the Universe and export it back to the repository
  6. In Crystal Reports, when attempting to refresh or open the report based of the Universe, it generates the following error:

 Error.png

Cause

  • 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.

Resolution

  • 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
    1. Open the report based of the Universe in Crystal Reports
    2. Under the menu: Database, select: Set Data Source Location...
    3. 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.
    4. In the Business Objects Query Panel, add the objects you want to add to the report, and click: OK
    5. Back to the Set Datasource location window, click on the: Update button.
    6. The Map Fiels window will display. Click: OK
    7. Back to the Set Datasource Location window, click: Close
    8. 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.

Keywords

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

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016