Null Subreport

  • Thread starter Thread starter rob p
  • Start date Start date
R

rob p

I have a main report which has has a subreport appended to the end of it. I
take amounts from the main report, subreport and total in main report
footer. Is there a way to totally suppress sub report if there are no
records. Or if not, is there a way to eliminate errors when there is nothing
in the fields. Data comes from query / table in both report and subreport.
Thanks, sample below:

Main
hours - wages - deductions
hours - wages - deductions

Sub Report
hours - wages - deductions

Main Report Footer
sum of hours - wages - deductions
 
To avoid the error of referring to a non-existent text box in a subreport
that has no data, test the HasData property of the report in the subreport
control:

=IIf([MySub].[Report].[HasData], Nz([MySub].[Report].[MyTextbox], 0), 0)
 
Back
Top