View Single Post
  #2  
Old June 2nd, 2010, 03:48 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Error in totals when no data in subreport

Barry wrote:
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)

--
Marsh
MVP [MS Access]