SAP Knowledge Base Article - Public

1912514 - Unable to drill-down on a blank subreport in Crystal Reports

Symptom

  • Unable to drill-down on a blank subreport.
  • When a report returns no data, it is not possible to drill-down on a linked subreport in Crystal Reports.
  • Before, it was possible to drill-down on a linked subreport, even when the main reports returned no data.

Environment

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

Reproducing the Issue

  1. In Crystal Reports, create a report off any data source.
  2. Create a second pass formula like:
      
         WhilePrintingRecords;
         NumberVar MyCounter := MyCounter + 1;
     
  3. Insert the formula in the details section of the report. ( It could be in any section, this is just an example )
  4. Insert a subreport in the Report Footer section of the report.
  5. In the subreport, create a parameter.
  6. On the main report, link the second pass formula to the subreport parameter.
  7. When refreshing the report, notice the main report and the subreport displays information, and it is possible to drill-down on the subreport.
  8. In the main report, create a Record Selection formula that will make the main report returns no data.
  9. Refresh the main report, and notice the main report is blank, as well as the subreport, and it is not possible to drill-down on the subreport.
    In some product version of Crystal Reports, it used to be possible to drill-down on the subreport.

Cause

  • When the main report returns no data, or the main report does not have a data source, it will not execute a subreport that is linked to the main report using a second pass formula because the subreport depends on the main report. Since there is no data on the main report, the subreport will not be executed, and nor will it be possible to drill-down on the subreport. This is normal behavior.
     
  • In some version of Crystal Reports, it was possible to drill-down on a subreport linked on a second pass formula because there was a product defect, which has now been resolved. For reference, see the SAP Knowledge Base Article 1576905.

Resolution

  • This is normal behavior, but to workaround this and be able to drill-down on a subreport when the main report returns no data, perform one of the following:
      
    • Ensure the subreport is not linked to the main report; or
       
    • Format the subreport to be on-demand. An on-demand subreport will only execute when you click on it regardless the main report has data or not.
      1. Right click on the subreport, and select "Format Subreport..."
      2. In the "Format Editor", under the tab "Subreport", check the option "On-demand Subreport"
      3. Click "OK" to accept the change.
          

Keywords

CR, drilldown on subreport, unable to Drill-Down , 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