Getting Grand Total on Report

G

Guest

I have an Access Project running on SQL Server. My report retrieves all of
the items I have sold. There is a text box for each detail which is set to
equal [Qty]*[SalePrice]. I named this text box [TotPrice]. It works fine;I
get a total price for each detail item.
My problem is I want to get a grand total of the entire sale. I created a
text box in the page footer and set it equal to Sum([Qty]*[SalePrice]) and i
got an error. I set the text box equal to Sum([TotPrice]) and I got an
error. I moved the text box to the report footer and I still get an error
using either of the values for the text box.
Does anyone have a possible solution for this?
TIA!!
 
A

Al Camp

Ron,
Your TotPrice field is an "unbound" calculated field, so while it can
display the correct "line" calculation, it cannot be directly Summed in your
footers.
In the query behind your report, create a field...
TotPrice : Qty* Price
or in SQL
Qty* Price as TotPrice

On the report, place the field TotPrice, and set the ControlSource to
TotPrice.
Now... TotPrice is a "bound" field, and =Sum(TotPrice) in ANY footer
(group or report) will calculate the proper totals.
hth
Al Camp
 
G

Guest

In my query I created [Qty]*[SalePrice] as [TotPrice], which works fine. I
put Sum([TotPrice]) in the footer. I get an error still. I went one
further and created Sum([TotPrice]) as [GrPrice] and put this text box in the
footer. It returns the TotPrice of the last item in my details list. I went
into the properties for GrPrice and set it as a running sum Over All and it
still returns the last TotPrice in the details list.
Thank you for your response, I hope we can resolve this.

Ron

Al Camp said:
Ron,
Your TotPrice field is an "unbound" calculated field, so while it can
display the correct "line" calculation, it cannot be directly Summed in your
footers.
In the query behind your report, create a field...
TotPrice : Qty* Price
or in SQL
Qty* Price as TotPrice

On the report, place the field TotPrice, and set the ControlSource to
TotPrice.
Now... TotPrice is a "bound" field, and =Sum(TotPrice) in ANY footer
(group or report) will calculate the proper totals.
hth
Al Camp

Ron said:
I have an Access Project running on SQL Server. My report retrieves all of
the items I have sold. There is a text box for each detail which is set
to
equal [Qty]*[SalePrice]. I named this text box [TotPrice]. It works
fine;I
get a total price for each detail item.
My problem is I want to get a grand total of the entire sale. I created a
text box in the page footer and set it equal to Sum([Qty]*[SalePrice]) and
i
got an error. I set the text box equal to Sum([TotPrice]) and I got an
error. I moved the text box to the report footer and I still get an error
using either of the values for the text box.
Does anyone have a possible solution for this?
TIA!!
 
G

Guest

I went back to my report and I put a copy of GrPrice in the details, with it
still set as a running sum over all. It shows for each item a GrPrice of the
current item and all of the items above it. The last item shows the grPrice
of all of the items.

I think it is getting closer to the desired result, but no quite there.

Ron
Ron said:
In my query I created [Qty]*[SalePrice] as [TotPrice], which works fine. I
put Sum([TotPrice]) in the footer. I get an error still. I went one
further and created Sum([TotPrice]) as [GrPrice] and put this text box in the
footer. It returns the TotPrice of the last item in my details list. I went
into the properties for GrPrice and set it as a running sum Over All and it
still returns the last TotPrice in the details list.
Thank you for your response, I hope we can resolve this.

Ron

Al Camp said:
Ron,
Your TotPrice field is an "unbound" calculated field, so while it can
display the correct "line" calculation, it cannot be directly Summed in your
footers.
In the query behind your report, create a field...
TotPrice : Qty* Price
or in SQL
Qty* Price as TotPrice

On the report, place the field TotPrice, and set the ControlSource to
TotPrice.
Now... TotPrice is a "bound" field, and =Sum(TotPrice) in ANY footer
(group or report) will calculate the proper totals.
hth
Al Camp

Ron said:
I have an Access Project running on SQL Server. My report retrieves all of
the items I have sold. There is a text box for each detail which is set
to
equal [Qty]*[SalePrice]. I named this text box [TotPrice]. It works
fine;I
get a total price for each detail item.
My problem is I want to get a grand total of the entire sale. I created a
text box in the page footer and set it equal to Sum([Qty]*[SalePrice]) and
i
got an error. I set the text box equal to Sum([TotPrice]) and I got an
error. I moved the text box to the report footer and I still get an error
using either of the values for the text box.
Does anyone have a possible solution for this?
TIA!!
 
D

Duane Hookom

You probably have your report total in the Page Footer section rather than
the Report Footer section.

--
Duane Hookom
MS Access MVP


Ron said:
I went back to my report and I put a copy of GrPrice in the details, with
it
still set as a running sum over all. It shows for each item a GrPrice of
the
current item and all of the items above it. The last item shows the
grPrice
of all of the items.

I think it is getting closer to the desired result, but no quite there.

Ron
Ron said:
In my query I created [Qty]*[SalePrice] as [TotPrice], which works fine.
I
put Sum([TotPrice]) in the footer. I get an error still. I went one
further and created Sum([TotPrice]) as [GrPrice] and put this text box in
the
footer. It returns the TotPrice of the last item in my details list. I
went
into the properties for GrPrice and set it as a running sum Over All and
it
still returns the last TotPrice in the details list.
Thank you for your response, I hope we can resolve this.

Ron

Al Camp said:
Ron,
Your TotPrice field is an "unbound" calculated field, so while it
can
display the correct "line" calculation, it cannot be directly Summed in
your
footers.
In the query behind your report, create a field...
TotPrice : Qty* Price
or in SQL
Qty* Price as TotPrice

On the report, place the field TotPrice, and set the ControlSource
to
TotPrice.
Now... TotPrice is a "bound" field, and =Sum(TotPrice) in ANY footer
(group or report) will calculate the proper totals.
hth
Al Camp

I have an Access Project running on SQL Server. My report retrieves
all of
the items I have sold. There is a text box for each detail which is
set
to
equal [Qty]*[SalePrice]. I named this text box [TotPrice]. It works
fine;I
get a total price for each detail item.
My problem is I want to get a grand total of the entire sale. I
created a
text box in the page footer and set it equal to
Sum([Qty]*[SalePrice]) and
i
got an error. I set the text box equal to Sum([TotPrice]) and I got
an
error. I moved the text box to the report footer and I still get an
error
using either of the values for the text box.
Does anyone have a possible solution for this?
TIA!!
 
G

Guest

When I put it in the report footer, I get the Qty*SalePrice of the first
Item. When I put it in the Page footer i get the Qty*SalePrice of the last
item.

Ron
Duane Hookom said:
You probably have your report total in the Page Footer section rather than
the Report Footer section.

--
Duane Hookom
MS Access MVP


Ron said:
I went back to my report and I put a copy of GrPrice in the details, with
it
still set as a running sum over all. It shows for each item a GrPrice of
the
current item and all of the items above it. The last item shows the
grPrice
of all of the items.

I think it is getting closer to the desired result, but no quite there.

Ron
Ron said:
In my query I created [Qty]*[SalePrice] as [TotPrice], which works fine.
I
put Sum([TotPrice]) in the footer. I get an error still. I went one
further and created Sum([TotPrice]) as [GrPrice] and put this text box in
the
footer. It returns the TotPrice of the last item in my details list. I
went
into the properties for GrPrice and set it as a running sum Over All and
it
still returns the last TotPrice in the details list.
Thank you for your response, I hope we can resolve this.

Ron

:

Ron,
Your TotPrice field is an "unbound" calculated field, so while it
can
display the correct "line" calculation, it cannot be directly Summed in
your
footers.
In the query behind your report, create a field...
TotPrice : Qty* Price
or in SQL
Qty* Price as TotPrice

On the report, place the field TotPrice, and set the ControlSource
to
TotPrice.
Now... TotPrice is a "bound" field, and =Sum(TotPrice) in ANY footer
(group or report) will calculate the proper totals.
hth
Al Camp

I have an Access Project running on SQL Server. My report retrieves
all of
the items I have sold. There is a text box for each detail which is
set
to
equal [Qty]*[SalePrice]. I named this text box [TotPrice]. It works
fine;I
get a total price for each detail item.
My problem is I want to get a grand total of the entire sale. I
created a
text box in the page footer and set it equal to
Sum([Qty]*[SalePrice]) and
i
got an error. I set the text box equal to Sum([TotPrice]) and I got
an
error. I moved the text box to the report footer and I still get an
error
using either of the values for the text box.
Does anyone have a possible solution for this?
TIA!!
 
D

Duane Hookom

What happens if you place the following in the Report Footer
=Sum(Qty*SalePrice)

--
Duane Hookom
MS Access MVP


Ron said:
When I put it in the report footer, I get the Qty*SalePrice of the first
Item. When I put it in the Page footer i get the Qty*SalePrice of the
last
item.

Ron
Duane Hookom said:
You probably have your report total in the Page Footer section rather
than
the Report Footer section.

--
Duane Hookom
MS Access MVP


Ron said:
I went back to my report and I put a copy of GrPrice in the details,
with
it
still set as a running sum over all. It shows for each item a GrPrice
of
the
current item and all of the items above it. The last item shows the
grPrice
of all of the items.

I think it is getting closer to the desired result, but no quite there.

Ron
:

In my query I created [Qty]*[SalePrice] as [TotPrice], which works
fine.
I
put Sum([TotPrice]) in the footer. I get an error still. I went one
further and created Sum([TotPrice]) as [GrPrice] and put this text box
in
the
footer. It returns the TotPrice of the last item in my details list.
I
went
into the properties for GrPrice and set it as a running sum Over All
and
it
still returns the last TotPrice in the details list.
Thank you for your response, I hope we can resolve this.

Ron

:

Ron,
Your TotPrice field is an "unbound" calculated field, so while it
can
display the correct "line" calculation, it cannot be directly Summed
in
your
footers.
In the query behind your report, create a field...
TotPrice : Qty* Price
or in SQL
Qty* Price as TotPrice

On the report, place the field TotPrice, and set the
ControlSource
to
TotPrice.
Now... TotPrice is a "bound" field, and =Sum(TotPrice) in ANY
footer
(group or report) will calculate the proper totals.
hth
Al Camp

I have an Access Project running on SQL Server. My report
retrieves
all of
the items I have sold. There is a text box for each detail which
is
set
to
equal [Qty]*[SalePrice]. I named this text box [TotPrice]. It
works
fine;I
get a total price for each detail item.
My problem is I want to get a grand total of the entire sale. I
created a
text box in the page footer and set it equal to
Sum([Qty]*[SalePrice]) and
i
got an error. I set the text box equal to Sum([TotPrice]) and I
got
an
error. I moved the text box to the report footer and I still get
an
error
using either of the values for the text box.
Does anyone have a possible solution for this?
TIA!!
 

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