By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

Subreport Totals

P: n/a
I have a main report with several sub-reports on it. Some of the
sub-reports are hidden some are visible. A few of the sub-reports hve
totals calculated on them. I have a control in the sub-report footer
that has a total in it.

When I try to reference that control on the main reports header section
it seems to be reading just one line of the detail in the sub-report.
Not the control with the total.

For the life me I can not figure out why this is the case. Everything I
have read says that to display a total on the main report you must have
a control on the sub-report with the amount on the footer and reference
it on the main report.

What am I missing?

The sub-report is based on a query.

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
This is going to sound dumb, but are you referencing the correct control,
using
the control's correct name?

By default, if you drag a field named, for example, TotalShipping to the
report,
it sets the control source to TotalShipping, and the name to ...
TotalShipping.
I change the names to txtTotalShipping in the detail and txtSumTotalShipping
in the footer.

That's one issue. Another is with regard to the syntax required to
reference a
control on a subreport (or subform). The syntax for a subform is like this
....

x = Me.frmMain.objMySubformObjName.Form.txtMySubformCo ntrolName

I assume it's the same for a report, but you use .Report in place of .Form.
(It's something I've never tried, but someone will correct me if I'm wrong.)

x = Me.rptMain.objSubReport.Report.txtMySubReportContr olName

I must admit that your explanation was difficult to follow. Is the text box
with
the summary info in one of the subreports or in the header or in the footer
of
the main report? This makes a difference, you know. If the summaries you
want
can be calculated in the footer, then ditch the subreports.

Danny Lesandrini
dl*********@hotmail.com

"Nothing" <me@you.com> wrote in message
news:3f*********************@news.frii.net...
I have a main report with several sub-reports on it. Some of the
sub-reports are hidden some are visible. A few of the sub-reports hve
totals calculated on them. I have a control in the sub-report footer
that has a total in it.

When I try to reference that control on the main reports header section
it seems to be reading just one line of the detail in the sub-report.
Not the control with the total.

For the life me I can not figure out why this is the case. Everything I
have read says that to display a total on the main report you must have
a control on the sub-report with the amount on the footer and reference
it on the main report.

What am I missing?

The sub-report is based on a query.

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #2

P: n/a
Sorry for the confusion. Sometimes the junk in my brain does not
translate very well through the keyboard.

The control that displays the information is on the header of the main
report. It has a control on it that has the following as its Control
Source: =[sub-rptBiddersNotPaid-TaxExpt].Report!Text18

[sub-rptBiddersNotPaid-TaxExpt].Report!Text18 is on the footer of the
sub-report. Its control souce =[Text20]. [Text20] is a running sume of a
field in the deatail section of the sub-report. I have the Running Sum
for [Text20] set to Over All.

When I open the sub-report, I see the total displayed on the report
footer and it is correct.

When I open the main report the control on the header of the report that
is linked to the sub-reportthis only displays one line item instead of
the total.

What am I missing?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.