SAP Knowledge Base Article - Public

1200639 - Linked subreport blank when refreshing the report in Crystal Reports

Symptom

  • Subreport blank.
  • Subreport returns no data.
  • Linked subreport returns no data, when refreshing the report in Crystal Reports.
        

Environment

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

Reproducing the Issue

  1. In Crystal Reports, create a report of any data source.
  2. Add a subreport to the report.
  3. Link the subreport to the main report on database fields, formulas, and or parameters.
  4. When refreshing the report, notice the subreport returns no data, despite we are expecting data. 

Cause

  • When linking a subreport to a main report, it automatically generates a Record Selection Formula for the subreport, so it only returns the data based on the values passed to the subreport.
       
  • Linked subreport returned no data when there is no data in the database that meet the Record Selection Formula because:
    • The subreport is not linked on the fields you want the subreport to filter the data on; or
    • The values passed from the main report to the subreport are not the expected values; or
    • The Record Selection Formula of the subreport is not set to filter the data you expect; or
    • The main report returns no data, and therefore linked subreport will return no data.

Resolution

  • To ensure a linked subreport returns the expected data set:
       
    1. Verify the links between the subreport and the main report is based on the fields you want to filter the subreport on.  
      ( To look at the subreport links, right click on the subreport, and select "Change Subreport Links...." )
          
    2. For troubleshooting purposes, add the fields you are linking the subreport on, to the section beside the subreport.
      And confirm the values passed from the main report are the one you expect.
          
    3. Verify the Record Selection Formula of the subreport to ensure it filters the data only on the values you are linking the subreports on.
      ( Right click on the subreport, and select "Edit Subreport". In the subreport design, under the menu "Report", select "Selection Formulas - Record..."
         And confirm the Record Selection Formula is filtering on the desired field )
         
    4. When refreshing the main report, ensure the main report has at least one row of data, otherwise the linked subreport will return no data. For more details:  see the SAP Knowledge Base Article 1213091

Keywords

blank subreport, linked subreport, subreport parameter, subreport , CR , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

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