[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2460
  • Last Modified:

Hide detail section of report if subreport has no data

On a report in the detail section I have a sub-report.  If there is no data in the sub-report I want to hide the detail section record.

Can this be done?

--Steve
0
SteveL13
Asked:
SteveL13
1 Solution
 
NARANTHIRANCommented:
Yes its possible..

Turn on Suppress Blank Section in the main report selection..
0
 
mbizupCommented:
Add the following to your Detail Format event in the main report:

    If Me.MySubReportName.Report.HasData = False Then Me.Detail.Visible = False

Open in new window


Or this (shorthand):

    Me.Detail.Visible = Me.MySubReportName.Report.HasData

Open in new window

0
 
SteveL13Author Commented:
I used the shorthand version.  Thanks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now