Null Subreport

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
 
A

Allen Browne

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top