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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
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,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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