Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refer to Running Sum Total in Subreport from Main report

Status
Not open for further replies.
Jun 6, 2001
26
AU
Hello Helpers

I have a report that contains 3 different sub reports. Each sub report contains a total which is used as an argument in a function in the main report. I am having trouble getting a value from the subreport that makes use of a running total. If I run the report with out referencing the value in the problem subreport they all work fine... however... if I reference the value from the sub report that contains the running total the subreport doesn't run correctly instead it seems to take the value of the first record for the running total.

This is incredibly frustrating. I am not entirely sure how access reports processes its data but I believe the main report is grabbing the value from the subreport before it has had time to process the value correctly.

Can someone help me on this.

Cheers.
 
Hi,

Sub Reports: place a text box in each of your SubRpts Report Footer. The control source for these equal the running sum in the detail section of the sub report. Set Running Sum set to no.

Main Report: Refer to the values in the subreports Report Footer in the Main Report Report Footer:

=[YourSubRpt1].Report!txtRsumFtr

Hope that helps.

 
Thanks, Unfortunately that didn't work.

I am using Access 2.0 and the running total isn't in the detail section but at group level.

If you have any other ideas would appreciate it!

Much thanks

Adam
 
Hi, I have not used Access 2.0 but if you have a total in the group footer I would do the same as originally described and place a total for that report in the subreport report footer. In the subreport footer, placing a text box whose control source equals the name of the control with Running Sum set to no in the group footer should accomplish the same thing.
Have you tried something like that yet?
 
The subreport goes something like this:

Uses a running sum on 2 calculated fields (Over group). A text box in a group footer makes reference to the running sums for a separate calculation. The running sum is necessary as each record in the group Lvl1 has a percentage of total (for the group) text box.

The sub report runs fine on its own but as soon as I try and obtain the value from the textbox (in subreport) that uses the running sum values onto the main report, the value that appears in the sub report is the 1st value for one of the running sums in the first group item. The value that appears in the main report is also equal to this value.

I believe the problem may relate to a running sum on the calculated field... any other ideas?

Thanks Again
 
Hi, I understand that. That is why I would create a total in the subreport's report footer, which references the total in the subreport's group footer.

Your parent report then uses the totals from the subreport's report footer.

Have you tried referencing your sums that way?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top