3

I have a sub report on another report that could have no records in it. Is there a way I can hide the report (and its label) when there are no records to display?

Alternately, is there a way to return a single row (e.g., "None") when an SQL re-query returns no rows?

BIBD
  • 15,107
  • 25
  • 85
  • 137

1 Answers1

4

There is a HasData property:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.MySubreport.Visible = Me.MySubreport.Report.HasData
End Sub
BIBD
  • 15,107
  • 25
  • 85
  • 137
Fionnuala
  • 90,370
  • 7
  • 114
  • 152