Print report with no data message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that prints fine when there is data but my user also want a
report to print when the is no data for audit purposes. They want Report
title and a message that says No data.

Can someone help
 
The report title can be a label.

Add a text box with Control Source of:
=IIf([HasData], Null, "No data")

Any calculated fields will show #Error, because there is nothing to
calculate. You will therefore need to alter the ControlSource of those to
include an IIf() and test the report's HasData property as well.

(Make sure the Name of these controls is not the same as the Name of any
field in the report's recordsource.)
 
I got around this by having a a label, in the detail section, with a
appropiate caption and setting the visible prperty to true on the reports
nodata_event. now maybe someone can tell me how to get this to work when
this is used as a subreport. It works good when used as a standalone report.
 
Use a text box on the *main* report to display the information that there is
no data in the subreport.

Example control source:
=IIf([Sub1].[Report].[HasData], Null, "Nothing to show in subreport")
 
Back
Top