SAP Knowledge Base Article - Public

1558782 - Error when refreshing a report based of a Universe using @Variables in Crystal Reports

Symptom

  • Error when refreshing a report based on a Universe.
  • When refreshing a report based on a Universe that uses @Variables, Crystal Reports fails.
  • Depending on the data source the Universe connect to, different error messages will display like:
    • For Oracle: "ORA-00936:missing expression."
    • For MS SQL Server: "Must declare scalar variable "@Variable". SQL State: 42000 Native Error: 137"

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020 

Reproducing the Issue

  1. In the Universe Design Tool, create a Universe based on any data source.
  2. Add an object to the Universe using: @Variable
  3. Export the Universe to the SAP BusinessObjects Repository.
  4. In Crystal Reports, create a report based on the Universe.
  5. When refreshing the report, it fails with an error like: "Must declare scalar variable "@Variable". SQL State: 42000 Native Error: 137"

Cause

  • The function: @Variables used in the Universe, is not resolved, when reporting of a Universe in Crystal Reports.
  • When connecting to a Universe, Crystal Reports only support the variable: @Variable('BOUSER'). Any other @Variable will be failing, as they are not supported with Crystal Reports.

Resolution

  • Either modify the Universe to not use the function: @Variable, or connect to the database directly, instead of connecting to a Universe.

See Also

  • For a list of supported functionalities when reporting off a Universe in Crystal Reports, see the document: Crystal Reports Universe Support.pdf
    In the Attachments section below.

Keywords

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

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020

Attachments

Crystal_Universe_Support.pdf