Calculations that include Blank SubReports

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

Guest

An Access 2003 report consists of several subreports. Each subreport has its
own totals. The bottom of the master report summarizes the data by adding
and subtracting totals from each subreport.

When each subreport contains data, everything works great. However, when
any given subreport contains No Data, final calculations are #error. I have
been unsuccessful in using the IsNull or Nz functions and suspect a No Data
subreport is different than Null.

How can I write the final total expressions so that No Data subreports do
not corrupt the results? Thank you...Linda
 
Test the HasData property of the report in the subreport control:

=IIf([Sub1].[Report].[HasData], Nz([Sub1].[Report].[MyTotal],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

Back
Top