View Full Version : Calculations with subreport in main report footer


marko
08-20-2003, 08:33 AM
Hi!

I have a subreport in my main report footer. I would like to get the sum of the subreport values on the main report.
I tried to type the following in the textbox controlsource on main report where I would like to see the total: =sum([subreportname]![textboxname]) but I get an error. Then I tried =sum([reports]![subreportname]![textboxname]) but I get an error again.

How can I get that total on the main report?

Thanks!

SforSoftware
08-20-2003, 10:41 AM
Marko,

Can't you can get the values right from the source of the subreport (query)?

Greetz
Bert

sxchopr
08-20-2003, 10:45 AM
Try this,

[Name of control in the main report which links to the Sub Report].[Report]![Name of control in the sub report]


Sandman

Rich
08-20-2003, 02:20 PM
Do the calculation in a textbox in the subreport footer, then use the HasData method to display the amount on the main report.
Search here for HasData, there are examples posted

marko
08-22-2003, 12:01 PM
Originally posted by Rich
Do the calculation in a textbox in the subreport footer, then use the HasData method to display the amount on the main report.
Search here for HasData, there are examples posted

Thank you on your replies everyone!
"Hasdata" works fine when my subreport is in the report footer on main report. But my problem is that I dont know how to get SUM calculation in a textbox on a main report from subreports that are in part# footer on my main form. So subreport are not in page or report footer.

Rich
08-23-2003, 01:04 AM
Form or report footer?

marko
08-28-2003, 04:13 AM
Originally posted by Rich
Form or report footer?

Sorry about the delay.
"part# footer" is in main report. But it is not in report footer but "part#" has its own footer!