Subreport Sum not recognized by main report (1 Viewer)

mafhobb

Registered User.
Local time
Today, 08:26
Joined
Feb 28, 2006
Messages
1,170
I have a report with several subreports. I have a subtotal sum on each subreport and on the main report an extended sum of all subtotals.

When the sum of a subreport's subtotal is null or = 0 (It displays 0.00), the extended total on the main report displays a "#Type" error, however if I simply click on the subreport that has that "0.00" value, then the error goes away and the extended sum is displayed correctly (it obviously does not add any value from that subtotal, which is "0" anyway).

I have added the Nz function to the subtotals and to the extended total to no avail. The extended sum just does not work under any circumstances until I click on the offending subreport.

I am baffled...

How can I fix this?

mafhobb
 

bastanu

AWF VIP
Local time
Today, 06:26
Joined
Apr 13, 2010
Messages
858
And same question asked here with answer:
Cheers,
 

mafhobb

Registered User.
Local time
Today, 08:26
Joined
Feb 28, 2006
Messages
1,170
Sorry. That solution did not work, or maybe I did not know how to implement it.

After days of trying to figure it out, I am still looking for a solution or a way to understand what is happening, nothing else.

mafhobb
 

bastanu

AWF VIP
Local time
Today, 06:26
Joined
Apr 13, 2010
Messages
858
I assume you tried without Val() and .Value and got the same. You say you click on the subreport so you must open it in Report view which I never use as I can't really see the point. What happens in Print Preview (or Print)? If you still have the issue try to move the expression to the Format event of the report section that has the extended total. If that also fails replace the reference to the subreport textboxes with dSums based on each subreport record source.
So you have tried everything I've posted there today and still no luck?
 

mafhobb

Registered User.
Local time
Today, 08:26
Joined
Feb 28, 2006
Messages
1,170
Hi bastanu.

I have not tried the solutions in your last post yet. I will get to it right away.

Many thanks

mafhobb
 

Users who are viewing this thread

Top Bottom