sum totals in report footer

  • Thread starter trevorC via AccessMonster.com
  • Start date
T

trevorC via AccessMonster.com

Hi All,
I hope I can get some help here,
I am trying to Sum in a report - details are

In details i have [Qty] and [Cost], this is multiplied together in the
Sub_total text box that has =[Qty]*[Cost] and correctly shows the sub total
in [Sub _total]. I am then trying to Sum this in the report footer - =Sum(
[Sub_total]) this is not working. If i remove the sum and just have the
Sub_total it shows the last entry only. I have been looking at various
examples but have had no luck at this time. I can resolve this issue by using
Excel as the report output but would prefer it stayed in Access.

Regards
Trevor
 
M

Marshall Barton

trevorC said:
I am trying to Sum in a report - details are

In details i have [Qty] and [Cost], this is multiplied together in the
Sub_total text box that has =[Qty]*[Cost] and correctly shows the sub total
in [Sub _total]. I am then trying to Sum this in the report footer - =Sum(
[Sub_total]) this is not working.


The aggregate functions pm;y operate on fields in the
report's record source table/query. They are unaware of
controls in the report.

Try using:
=Sum([Qty]*[Cost])
 
A

Al Campagna

Trevor,
One way, of several ways, ids to create a bound calculated column in
the query behind your report.
In query design, in a blank column, in the Field line...

Sub_Total : Cost * Qty

Now, Sub_Total is a "bound" control. Place it on the form instead of
your
old calculated control. Sub_Total can now be "directly summed" in any
report footer.

Cost Qty Sub_Total
.25 5 1.25
.75 2 1.50
-----------------------
=Sum([Sub_Total]) = 2.75
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
T

trevorC via AccessMonster.com

Thanks all for the replies, I have the solution now,

I am using the following in the report footer and then
=Sum([Cost]*[Qty Used]) for the Sub total (no running sum) (datail
section)
=Sum([Cost]*[Qty Used])/100 for the G.S.T.
(report footer)
=[GST]+[Summary_total] for the Total
(report footer)

regards
Trevor
 

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