Report footer

G

Guest

Have four totals of sales catagories that are summed in the report
footer(example. =Sum([WEB Site Orders]). This report runs off a select query
with a date parameter. Works great but have been requested to have these four
catagory sum totals to all add up as one figure ($$$). Have tried to add
another text box in the report footer with the control source expression as:

=Sum([WEB Site Orders])+([Telephone Orders])+([Fax Orders])+([Mail Orders])

Here is the SQL View of the query:

SELECT linkPNOrders.DATE, Sum(linkPNOrders.E) AS [WEB Site Orders],
Sum(linkPNOrders.T) AS [Telephone Orders], Sum(linkPNOrders.F) AS [Fax
Orders], Sum(linkPNOrders.M) AS [Mail Orders], Count(*) AS [Order Count]
FROM linkPNOrders
GROUP BY linkPNOrders.DATE
HAVING (((linkPNOrders.DATE) Between [Enter Start Date] And [Enter End
Date]));

Any direction would be appreciated.
 
R

Rick Brandt

ksr said:
Have four totals of sales catagories that are summed in the report
footer(example. =Sum([WEB Site Orders]). This report runs off a
select query with a date parameter. Works great but have been
requested to have these four catagory sum totals to all add up as one
figure ($$$). Have tried to add another text box in the report footer
with the control source expression as:

=Sum([WEB Site Orders])+([Telephone Orders])+([Fax Orders])+([Mail
Orders])

You have your parenthesis incorrect. You need either...

=Sum([WEB Site Orders]+[Telephone Orders]+[Fax Orders]+[Mail Orders])

....or...

=Sum([WEB Site Orders])+Sum([Telephone Orders])+Sum([Fax Orders])+Sum([Mail
Orders])
 
G

Guest

Rick,
Thanks for the reply.

I did as mentioned but have a result when there is a figure in all four
sales catagories on the same date (same line across on the report for that
date) In other words the expression seem to trigger when all four catagories
have sales figures on that date but does not include any other sales
catagories cominations. I am afraid my explanation might be confusing ?

--
Thanks for your time

ksr


Rick Brandt said:
ksr said:
Have four totals of sales catagories that are summed in the report
footer(example. =Sum([WEB Site Orders]). This report runs off a
select query with a date parameter. Works great but have been
requested to have these four catagory sum totals to all add up as one
figure ($$$). Have tried to add another text box in the report footer
with the control source expression as:

=Sum([WEB Site Orders])+([Telephone Orders])+([Fax Orders])+([Mail
Orders])

You have your parenthesis incorrect. You need either...

=Sum([WEB Site Orders]+[Telephone Orders]+[Fax Orders]+[Mail Orders])

....or...

=Sum([WEB Site Orders])+Sum([Telephone Orders])+Sum([Fax Orders])+Sum([Mail
Orders])
 
M

Marshall Barton

ksr said:
I did as mentioned but have a result when there is a figure in all four
sales catagories on the same date (same line across on the report for that
date) In other words the expression seem to trigger when all four catagories
have sales figures on that date but does not include any other sales
catagories cominations. I am afraid my explanation might be confusing ?


Use Rick's second expression.
 
R

Rick Brandt

ksr said:
Rick,

I used the second expression as Marshall suggested and it works great
!!!

Good to hear. The first one would only work if none of the operands contained a
Null value. Sounds like that was the case for you. It could be made to work
with a small change to add the Nz() function around each value...

Sum(Nz([WEB Site Orders],0)+Nz([Telephone Orders],0)+Nz([Fax Orders],0)+Nz([Mail
Orders],0))
 
G

Guest

Thanks Rick for the effort on the additional information.
I will keep that in mind for the future

--
Thanks for your time

ksr


Rick Brandt said:
ksr said:
Rick,

I used the second expression as Marshall suggested and it works great
!!!

Good to hear. The first one would only work if none of the operands contained a
Null value. Sounds like that was the case for you. It could be made to work
with a small change to add the Nz() function around each value...

Sum(Nz([WEB Site Orders],0)+Nz([Telephone Orders],0)+Nz([Fax Orders],0)+Nz([Mail
Orders],0))
 

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