SAP Knowledge Base Article - Public

1335960 - Incorrect data set returned when refreshing a report based on unlinked Tables, Views or Stored Procedures, in Crystal Reports

Symptom

  • Duplicate values.
  • Incorrect data set displayed on the report.
  • When a report contains unlinked Tables, it return an unexpected data set in Crystal Reports.
  • Is it possible to place data on the report from tables, views, or stored procedures, that are not related to each other in Crystal Reports?

Environment

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

Reproducing the Issue

  1. In Crystal Reports, create a report based on any data source.
  2. Add at least 2 Tables, Views, or Stored Procedure on the report, and do not link it.
  3. Add at least one database field from each Table, Views, or Stored Procedure to the Details section of the report.
  4. Refresh the report.
      
    Notice the result set is incorrect.

Cause

  • When the Tables, Views, or Stored Procedure, are not linked, it will create a Cartesian join between all the object added on the report, which will return an unexpected result.

Resolution

  • Crystal Reports is a Relational Database reporting tool, and Tables, Views, or Stored Procedure on a report needs to be linked to return the correct result.
        
  • If there is no relationalship between the Tables, Views or Stored Procedures, use one on the main report, and the other in different subreports, as a subreport, is a report within a report.

Keywords

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