Error in totals when no data in subreport

B

Barry

Good Evening:
I have a report ("Invoice") which has 2 subreports, one for parts and the
other for labor. When either has no data the calculations for totals on the
main report show #error. I am having difficulty making the data from the
offending subreport zero (0). Any ideas as to how to force the situation
when no data exists in the particular subreport? Thanks much for reading
this.

Barry
 
M

Marshall Barton

Barry said:
I have a report ("Invoice") which has 2 subreports, one for parts and the
other for labor. When either has no data the calculations for totals on the
main report show #error. I am having difficulty making the data from the
offending subreport zero (0). Any ideas as to how to force the situation
when no data exists in the particular subreport?



The grand total calculation should use this kind of
expression:

=IIf(subreport1.HasData, subreport1.Report.total1, 0)
+ IIf(subreport2.HasData, subreport2.Report.total2, 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