Adding from several subreports

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

Guest

I don't know if this is possible or if anyone might have another suggestion,
but I have a main report with has several imbedded sub-reports. Is there a
way to "sum" one field from each different subreport (4 in all)?
 
Lori said:
I don't know if this is possible or if anyone might have another suggestion,
but I have a main report with has several imbedded sub-reports. Is there a
way to "sum" one field from each different subreport (4 in all)?


If the values you want to retrieve from the subreport is in
their Report Header or Footer section, then Yes.

The expression in the total text box would look like:

=subreportcontrol1.Report.value1 +
subreportcontrol2.Report.value2 + . . .

If there's a chance that a subreport may not have any data,
then use this:

=IIf(subreportcontrol1.Report.HasData,
subreportcontrol1.Report.value1, 0) + . . .
 
It doesn't matter where the subreports are in the main
report as long as the total text boxes are in the same
section. What I was trying to say is that the value to be
retrieved from a subreport must be in the subreport's
header/footer section.

If that is totally off base, then please provide more
information about your subreports, the values you want to
total, and how that fits into the main report.
 
Good Morning Marshall,

I understand now, thank you =)

Marshall Barton said:
It doesn't matter where the subreports are in the main
report as long as the total text boxes are in the same
section. What I was trying to say is that the value to be
retrieved from a subreport must be in the subreport's
header/footer section.

If that is totally off base, then please provide more
information about your subreports, the values you want to
total, and how that fits into the main report.
--
Marsh
MVP [MS Access]

What if the sub-reports are in the Detail section?
 
Back
Top