View Full Version : =SUM sub-reports ?


piet123
08-24-2004, 03:27 AM
Quote:
Originally Posted by Rich
Use the HasData method, search the archives here for examples

Got it. Thank you. But now this:

1. In MainReport's GROUP FOOTER section I have 3 sub-Reports.
2. In MainReport's GROUP FOOTER section I now also have a textbox
(name 'text123') with the =Iif/HasData function which calculates the "totals" of all 3 sub-reports. This is all OK.

4. In the MainReport's REPORT FOOTER section I tried this:
=sum([text123]) No such luck. When report runs, it prompts for text123.

Any advice please !

Thanks.
Piet.

jv2
08-24-2004, 03:58 AM
You can't do a Sum on a calculated field....

have you tried using "RunningSum" (overg roup, or over all)

piet123
08-24-2004, 04:53 AM
You can't do a Sum on a calculated field....

have you tried using "RunningSum" (overg roup, or over all)

i've tried that. it still prompts for textbox in mainreport footer.

"you can't do a sum on a calculated field..."

- only in a report ?
- or not at all ?
- can i make a query that will calculate the report's calculated field ?
- any other method ?

any advice PLEASE.
thanks,
Piet

jv2
08-24-2004, 04:59 AM
http://support.microsoft.com/default.aspx?scid=kb;EN-US;113354

Ive used a hidden controlbox before which keeps a running total through the report... then display it in the end in another box...

Rich
08-24-2004, 12:28 PM
= Sum(IIf([sub1].[Report].[HasData],[sub1].[Report]![YourTextBox],0) +
Sum(Iif etc etc