Hiding Subreport

A

Anita Taylor

I'm looking for a way to hide a subreport if it contains
no data. I found the HasData property, but I'm not sure
how to use it, where to put it, etc. Any help would be
appreciated.
 
M

Marshall Barton

Anita said:
I'm looking for a way to hide a subreport if it contains
no data. I found the HasData property, but I'm not sure
how to use it, where to put it, etc. Any help would be
appreciated.

Put somthing like this:

If Me.subreportcontrol.Report.HasData Then
Me.subreportcontrol.Visible = True
Else
Me.subreportcontrol.Visible = False
End If

in the Format event procedure of the section containing the
subreport.
 

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