SAP Knowledge Base Article - Public

1215025 - How to suppress a blank subreport in Crystal Reports?

Symptom

  • How to supress an empty subreport?
  • How to not print a subreport that returns no data?
  • How to suppress a subreport if it contains no data in Crystal Reports?

Environment

  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016

Reproducing the Issue

  1. In Crystal Reports, create a report off any data source.
  2. Insert multiple Report Footer section.
  3. Insert in each Report Footer section a subreport, linked to the main report.
  4. When the report is refreshed, it reserve blank space for subreports that returns no data. How to suppress the blank subreport?

Resolution

  • To suppress a blank subreport, select the subreport option: 'Suppress Blank Subreport', and select the section option: 'Suppress Blank Section'
        
    1. Open the report in Crystal Reports.
           
    2. Right-click on the subreport and select 'Format Subreport'.
           
    3. In the Format Editor window, under the tab "Subreport", check the option: 'Suppress Blank Subreport'
        
       Suppress Blank Subreport - 01.png 
        
         
    4. Click "OK" to accept the change.
          
    5. Right-click on the section containing the subreport and select 'Section Expert...'
          
    6. In the Section Expert window, check the option 'Suppress Blank Section'
        
       Suppress Blank Subreport - 02.png
            
          
    7. Click "OK" to accept the change.
            
      Now, the subreport and the section will not display on the main report when no data is contained in the subreport. But ensure there is no other objects in the section in which the subreport is located, like database fields, pictures,... , otherwise the section will still be printed.
         
           
             
  • In Crystal Reports 8.5 and earlier, a blank subreport cannot be suppressed. For more information on how to workaround this limitation in Crystal Reports 8.5 and earlier, see the SAP Knowledge Base Article 1211338

Keywords

NULL subreport, CR , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , How To

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016