2085350 - Old report using modified SQL query ignores part of the query in CR 9 and up

SAP Knowledge Base Article - Public

2085350 - Old report using modified SQL query ignores part of the query in CR 9 and up

Symptom

  • Report created in Crystal Reports 8.5.x or older.
  • SQL Query was modified to create UNION ALL.
  • Running the report in CR 2011 +, the second part of the Union is ignored.

Environment

  • Crystal Reports 9.x and higher

Reproducing the Issue

  • Crystal Reports 8.5 allowed edit of the SQL statement.
  • Modify the SQL statement.
  • Run the report in CR 9 or later.

Cause

  • Edit of SQL statements in the Crystal Reports designer was eliminated in CR 9.x and later.

Resolution

  1. Copy the SQL from the old report.
  2. Open the report in a new version of Crystal Reports and go to Show SQL > Reset.
  3. Under Database Option go to Set Datasource Location and from the panel at the bottom create a connection to the database.
  4. Expand the connection name and Highlight Add Command.
  5. Highlight the Table Name on the Panel on the top panel and Click Update.
  6. Paste the SQL query you copied in step 1 and click on OK.
  7. The Command Window also has an option on the right to create parameters.

See Also

  • If the report will use parameters, create the parameters in the Command Editor in  order for them to be "visible" to the command. 
  • Once the parameter has been created in the Command Editor, it can be edited in the Field Explorer to change or manage the properties.
  • Example:, make the parameter with a dynamic prompt.

Keywords

CR connect query union db , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 10.0 ; SAP Crystal Reports 2011, feature pack 03 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 9.0 ; SAP Crystal Reports XI ; SAP Crystal Reports XI R2