Calculating fields from each sub report to a main report (shared variables)

Bancell

New Member
Joined
Mar 22, 2004
Messages
41
I am building a report with a sub report where I need to bring totals up from each group in the sub report to the main report. I have everything working on the first sub group however as soon as you start to scroll through the report it breaks. I keep reading about using a shared variable but cant find any documentation on shared variables.

Can anyone point me in the right direction?

Thanks in advance.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I can't see how a shared variable would have anything to do with this.
I write reports very rarely in Access so I'm not much help.

It depends somewhat on your report. If, for instance the groups are "totals by department", then the main report can just be "total" and you don't actually have to use the report sub data - i.e., subreports are the sql equivalent of "select [Dept], sum([Value]) as Total group by [Dept]", while the main report is just "sum([Value]) as GrandTotal".

Otherwise you can play with DSum() functions or using grouping in Access reports.
 
Upvote 0
Thanks for the reply Xenou. I figured out how to get it working after a couple of hours of beating my head against the wall.
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,267
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top