Elana
04-19-2000, 02:45 PM
I have approximately 25 reports that need to be run every month. If there is no data for a report for that month, then of course we get the "#Error" instead of the report title because there are no records. I am using a "no data" macro that stops the print on no data in a report, but...what I would really like is, at the end of the print job (after all 25 reports have printed) a way to identify which report(s)didn't print...like a list of some kind showing the report names that had no data.
Is this possible? Does anyone have any ideas? Thanks.
Pat Hartman
04-19-2000, 06:40 PM
You can use the NoData event of the report to log an entry in a table. At the end of your batch printing process you could run another report off the log table. If it is empty (for the current date), you can print an unbound report to that effect.
Noreene Patrick
09-18-2003, 10:42 AM
I have a similar request...I have a macro that prints 5 reports which works fine...the only thing I am having trouble with is if the report is empty, I want that report to close without printing. I know this is so simple and I have tried several ways but I just cant get the syntax right...I was trying to put it in the where condition of the macro.
It should be something like this
If isnull [nameto] then
printout =false
end if
(you can see what I am trying to do)
I know this is vb but how would I convert this process to a macro?
Thanks, Noreene
Private Sub Report_NoData(Cancel As Integer)
MsgBox "There is no data for the period you have selected", vbOKOnly
Cancel = True
End Sub
omit the message if not required?
Noreene Patrick
09-18-2003, 12:13 PM
HOW SIMPLE!!!!
Thanks so much
Noreene