VSView Reporting Edition Reference > VSReport Control > VSReport Events > OnNoData Event |
Fired when the control starts rendering a report and the source recordset is empty.
Private Sub VSReport_OnNoData()
Use this event to cancel rendering a report when the source recordset is empty. To cancel rendering the empty report, set the Cancel property to True while handling this event. For example:
Private Sub vsr_OnNoData()
vsr.Cancel = True
End Sub
If you don't set the Cancel property to True, the report will be rendered as an unbound report (a self-contained report with no underlying data).