SAP Knowledge Base Article - Public

1219332 - Old reports with modified SQL query does not run in later version of Crystal Reports

Symptom

  • SQL Query of a report was modified.
  • When refreshing the report in newer version of Crystal Reports, it does not work.
  • A report is created in Crystal Reports 8.5. The SQL Query generated by Crystal Reports was then modified manually. When attempting to open the report in a later version of Crystal Reports an error message appears, or Crystal Reports stops responding.

Environment

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

Reproducing the Issue

  1. In Crystal Reports 8.5, or lower, edit the SQL Query generated by Crystal Reports.
  2. Save the report.
  3. In Crystal Reports 9 or later, refresh the report.
       
    An error message appears, or Crystal Reports stops responding.

Cause

  • Editing the SQL Query generated by Crystal Reports was removed from Crystal Reports 9 and later, and causes the error.

Resolution

  • To be able to refresh the report, reset the SQL Query:
    1. In Crystal Reports, open the report.
        
    2. Under the menu "Database", select "Show SQL Query"
       
    3. In "Show SQL Query", click on the button"Reset" 
        
      ( The Reset button only display if the report was created in Crystal Reports 8.5 and lower, and the SQL Query generated by Crystal Reports was manually modified. )
        
    4. Close the window.
        
    5. Save the report.
        
  • Notes:
    • You cannot reset the SQL Query through the SDK.
    • If you need to use a customized SQL Query, based the report on a Command Object, instead of Tables. A Command Object enable you to write your own SQL Query. For more information see the SAP Knowledge Base Article: 1531012

Keywords

CR , 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