- 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.
- Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
Reproducing the Issue
- In Crystal Reports, create a report off any data source.
- Create a second pass formula like:
NumberVar MyCounter := MyCounter + 1;
- Insert the formula in the details section of the report. ( It could be in any section, this is just an example )
- Insert a subreport in the Report Footer section of the report.
- In the subreport, create a parameter.
- On the main report, link the second pass formula to the subreport parameter.
- When refreshing the report, notice the main report and the subreport displays information, and it is possible to drill-down on the subreport.
- In the main report, create a Record Selection formula that will make the main report returns no data.
- 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.
- 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.
- 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.
- Right click on the subreport, and select "Format Subreport..."
- In the "Format Editor", under the tab "Subreport", check the option "On-demand Subreport"
- Click "OK" to accept the change.
CR, drilldown on subreport, unable to Drill-Down , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem
Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013