Hiding/Displaying a Sub-report

G

Guest

I created a report that has 2 sub-reports in it as well, let's call them
Sub-report A and B. Both sub-reports are on top of one another in the design
of the report because I don't have spcae in the report to put them below or
beside each other. Sub-report A always has data to show in the report
whereas Sub-report B may not have data to show depending on the date range
chosen for the report. I don't want both sub reports to display all the time
since they are on top of each other in the design of the report. I only want
Sub-report A to show if there's no data to show for Sub-report B. Is there
anyway to hide/display sub-reports depending on whether data exists for that
sub-report or not? Thanks.
 
G

Guest

You could try some code in the On Format event of the section containing the
subreports like:
Me.sprtA.Visible = (Me.srptB.Report.HasData = False)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top