Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report for no data

Status
Not open for further replies.

dandot

Programmer
Jul 19, 2005
53
CA
I need to have a scenario, where a subreport will display a certain report if data exists, and a generic no data message on a report if no data exists.

Is there any easy way to do this.

I assume I need to have 2 seperate subreports and enable the can shrink property. is this correct?
 
Also the generic no report data has certain columns and stuff in it..... is there anyway i can display subreports conditionally?
 
How about:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.[i][Subreport Control Name][/i].Report.CurrentRecord = 0 Then
    Me.[i][Control Name][/i].Visible = True 
Else
    Me.[i][Control Name][/i].Visible = False
End If
End Sub
 
dandot,

Check out my response in thread703-856382. You should be able to adapt it to your situation....

Si hoc legere scis, nimis eruditionis habes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top