subreport sum total issue

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

Guest

I hava a report with 3 subreports, I would like to sum the total as below :

text1 = reporttotal + subreport1total + subreport2total + subreport3total

I have got #error in text1 if one of the subreports have NO data. I tried to
solve the problem but found the error#2427 only, could yuo please help?

Thanks in advance!
 
Andy said:
I hava a report with 3 subreports, I would like to sum the total as below :

text1 = reporttotal + subreport1total + subreport2total + subreport3total

I have got #error in text1 if one of the subreports have NO data. I tried
to
solve the problem but found the error#2427 only, could yuo please help?
Hi Andy,

Are you trying to "summarize" your report?

If so, I might suggest summarizing in one more
subreport that you put in the report footer. Its
a strategy I've used many times.

good luck,

gary
 
Hi Gary,

Actually I am not sure what you means, the problem is if one of the
subreport have NO data, the formula as below have got a #error, eventhough I
use "summarize" ALL the reports. Please advise details if possible. Thanks
very much!
 
"Andy"wrote:>
Actually I am not sure what you means, the problem is if one of the
subreport have NO data, the formula as below have got a #error, eventhough
I
use "summarize" ALL the reports. Please advise details if possible. Thanks
very much!
Hi Andy,

I don't know your data nor sources for your subreports,
but sometimes it is possible to create a query that produces
the same info you are trying to "summarize" from subreports...

then use that query as the source for your final subreport...
it "stands alone" in the big report footer not caring what happens
in any previous subreports.

Is that possible in your situation?

Often times I will give these a title in the page header
(which will not show up when used as subreport),
and give user extra option to just open this summary
report by itself vs the big detail report.

good luck,

gary
 
Andy said:
I hava a report with 3 subreports, I would like to sum the total as below :

text1 = reporttotal + subreport1total + subreport2total + subreport3total

I have got #error in text1 if one of the subreports have NO data. I tried to
solve the problem but found the error#2427 only, could yuo please help?


A subreport with no data has no values so you can not refer
a text box value.

Change the text box expression to this kind of thing:

=reporttotal + IIf(subreport1.Report.HasData,
subreport1.Report.total, 0) + IIf(subreport2.Report.HasData,
subreport2.Report.total, 0) + IIf(subreport3.Report.HasData,
subreport3.Report.total, 0)
 
Back
Top