Report Totals

G

Guest

Hi All,

I have a subreport grouped by part number. In the part number footer, I have
totals of about 5 different fields. Then I placed a text box on the main
report indicating each total. (The totals on the subreport are invisible) My
syntax is the following:
=Reports!rptTPT!subrptTPT_MatExp!MaturationCost FieldName: TotalExp

I want a Grand Total for the whole report for all part numbers, so I've
created a field in the Report Footer, in the Control Souce typed in the
following:

=Sum([TotalExp])

When I run the report, a box pops up Enter Parameter Value TotalExp. I
completely lost.... I would have thought this would work.

Thanks in adance for your help.
G. Wolfe
 
M

Marshall Barton

G. Wolfe said:
I have a subreport grouped by part number. In the part number footer, I have
totals of about 5 different fields. Then I placed a text box on the main
report indicating each total. (The totals on the subreport are invisible) My
syntax is the following:
=Reports!rptTPT!subrptTPT_MatExp!MaturationCost FieldName: TotalExp

I want a Grand Total for the whole report for all part numbers, so I've
created a field in the Report Footer, in the Control Souce typed in the
following:

=Sum([TotalExp])

When I run the report, a box pops up Enter Parameter Value TotalExp. I
completely lost.... I would have thought this would work.


The aggregate functions (Count, Sum, etc) only operate on
fields in the report's record source table/query. They are
unaware of controls on the form/report.

What you need to do is total the values in the subreport's
footer section, then the main report text box, TotalExp, can
refer to the subreport totals using the expression:
=rptTPT!subrptTPT_MatExp.REPORT!MaturationCost

You can then get the grand total from all the subreports by
setting the TotalExp text box's RunningSum property to Over
All. The GrandTotalExp text box (in the main report footer)
expression would simply be: =TotalExp
 
G

Guest

Hi Marshall,

Thanks for the reply.

I can get the overall totals to work in the subreport. This is when I view
the subreport by itself. When I view the complete report the "Grand Total"
shows up under each Part Number section, and I get a zero value under the
main report where I type =TotalExp

Can you tell me what I'm doing wrong?

Thanks again.
G.
 
M

Marshall Barton

I think you might have misunderstood my instructions, but I
can't tell for sure what you did. I wanted the TotalExp
test box in the same section as the subreport. It would use
the expression I posted and have its RunningSum property set
to Over All. The Grand Total text box should be in the main
report's footer section (not a group or page footer).

If that doesn't help, I'll need a lot more details about
these text boxes before I can determine what's not working.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top