October 17, 2016

Crystal Reports - Suppress the Section when SubReport is blank

You might encounter unwanted blank(white space) while printing in Crystal Report which contains one or more sub-report(s). You can follow these steps to get hide a blank section or group, if there are no records in sub-report(s).

  1. First right click on sub-report and click on option "Format Object".

    crystal report - menu format object

  2. Go to "Subreport" tab and set the checkbox "Suppress Blank Subreport" as marked true.

    crystal report - subreport-tab-suppress-blank-subreport

  3. At this stage, sub-report will be hidden, but still you might see blank space on parent report. And for this we have to set one more option for the section or group where you have placed the sub-report. So right click on the Section or Group, and select "Section Expert" option from menu.

    crystal report - group-header-menu-section-expert-item

  4. In this Section Expert dialog box, select the target Group/Section from left hand side, where you have placed sub-report, and then in the "Common" tab on right side, set the checkbox "Suppress Blank Section" as marked true.

    crystal report - expert-common-tab-suppress-blank-section

Now run the main report and you should not see that blank space caused by sub-report(s) having no data.