- Report fails to refresh.
- Unable to refresh a report based off a Universe.
- In Crystal Reports, when refreshing a report based off a Universe that uses Universe @Variable, it fails with an error like:
"Failed to retrieve data from the database...
Encountered the symbol "UNVNAME" when expecting one of the following..."
- 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 based off a Universe.
- In the Universe Designer, update the Universe connection parameter: ConnectInit
and add the following:
- BEGIN DBMS_SESSION.SET_IDENTIFIER('@Variable('BOUSER')');
- DBMS_APPLICATION_INFO.SET_MODULE(module_name => 'BO-'||'@Variable('UNVNAME')', action_name => '@Variable('DOCNAME')');END;
- Crystal Reports when reporting off Universe support the variable: ‘BOUSER’ only. All other Universe variables are not supported.
- Therefore, when the SQL Query generated by the Universe involves other Universe @Variables, like @Variable('UNVNAME') and @Variable('DOCNAME'), it cannot be interpreted by Crystal Reports, and the report fails to refresh.
- For further information on what is supported in Crystal Reports when reporting off a Universe, see the document: Crystal Reports Universe Support
- To be able to report off a Universe, ensure it does not use any of the unsupported Universe variable:
- In Crystal Reports, open the report based off the Universe, and take note of the Universe it is based off.
- In the Universe Designer Tool, import the Universe the report is using.
- Remove any of the unsupported Universe variables, like in the example provided, remove the following variables from the connection parameter ConnectInit:
- Save and replublish the Universe.
- In Crystal Reports, re-open the report, and it will now refresh successfully.
CR, UNV, @VAR , 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
|Universe based CR whats supported (2).pdf|