To run a macro when the NoData event occurs, set the OnNoData property to the name of the macro.
You can use the CancelEvent action in a NoData macro to cancel printing of the blank report.
NoData Event — Event Procedures.