Adding two Subreports together

  • Thread starter Thread starter David Tunstall
  • Start date Start date
D

David Tunstall

Please help.

I am trying to add two subreports together in a report.
The two subreports are A1 and A2. On each of these
subreports is a text box called Count, so I have A1.Count
and A2.Count. For some reason I am getting an error
message when I try to add them together. I have tried:

([A1].[Report]![Count])+([A2].[Report]![Count])
=Sum([A1].[Report]![Count])+([A2].[Report]![Count])

Plus a couple others but I either get a name? error or a
#error.

The calculation worked fine before I changed the queries
they are based on to include the Nz function. The columns
added together fine as long as they were not null, but
now it shows a zero instead of null the calculation
doesn't work.

I hope this makes sense
Thanks
David
 
You must always begin an expression with "=". You might want to try:
=ValIIf([A1].[Report].HasData,[A1].[Report]![Count],0))+ValIIf([A2].[Report]
..HasData,[A2].[Report]![Count],0))
 
Back
Top