How to summarize a calculated field

V

verci

Hi
I've the following text boxes in the group header section of my report, they
do not obtain the data source from any table they are calculated fields,
Import is a field in my invoice table that holds the inicial value of
any given article, Retention is a boolean field in my invoice table, and
Subtotal is a calculated field .

txtSubtotal = Sum([Import])
txtTax = ([Subtotal]*10)/100
txtRetetion= IIf([Retention]=True,(([Subtotal]*4)/100),"")
txtTotal =
IIf([Retention]=True,(([Subtotal]+[txtTax])-[txtRetention]),[Subtotal]+[txtT
ax])


What I want is to put on the reports footer section the summarize grand
total of all the values returned by these calculated fields, i.e
. txtGranSubtotal would hold the summarize value of txtSubtotal
txtGranTaxt would hold the summarize value of txtTaxt
txtGranRetetion would hold the summarize value of txtRetention
txtGranTotal would hold the summarize value of txtTotal

So far I'm stuck, any help would be very appreciated!!!!!!

Best regards
 
D

Destin Richter

Generally speaking, if your report has a field called ItemCost, you can put
an expression in your report footer "=sum(ItemCost)" that will total up the
values for you. It is also helpful if you can have a query as the report
source that calculates as many fields as possible. Get back to me if this
doesn't help.

Destin Richter
(e-mail address removed)
 
V

verci

hi
It did not work, if I use the format you sugested when I run the report it
asked me for the value as if it where another parameter value i.e.
=sum(ItemCost) , access prompt me for ItemCost, plese I don't know what am
I doing wrong.

regards


Destin Richter said:
Generally speaking, if your report has a field called ItemCost, you can put
an expression in your report footer "=sum(ItemCost)" that will total up the
values for you. It is also helpful if you can have a query as the report
source that calculates as many fields as possible. Get back to me if this
doesn't help.

Destin Richter
(e-mail address removed)

verci said:
Hi
I've the following text boxes in the group header section of my report, they
do not obtain the data source from any table they are calculated fields,
Import is a field in my invoice table that holds the inicial value of
any given article, Retention is a boolean field in my invoice table, and
Subtotal is a calculated field .

txtSubtotal = Sum([Import])
txtTax = ([Subtotal]*10)/100
txtRetetion= IIf([Retention]=True,(([Subtotal]*4)/100),"")
txtTotal =
IIf([Retention]=True,(([Subtotal]+[txtTax])-[txtRetention]),[Subtotal]+[txtT
ax])


What I want is to put on the reports footer section the summarize grand
total of all the values returned by these calculated fields, i.e
. txtGranSubtotal would hold the summarize value of txtSubtotal
txtGranTaxt would hold the summarize value of txtTaxt
txtGranRetetion would hold the summarize value of txtRetention
txtGranTotal would hold the summarize value of txtTotal

So far I'm stuck, any help would be very appreciated!!!!!!

Best regards
 
T

Tom Lake

verci said:
Hi
I've the following text boxes in the group header section of my report,
they
do not obtain the data source from any table they are calculated fields,
Import is a field in my invoice table that holds the inicial value of
any given article, Retention is a boolean field in my invoice table, and
Subtotal is a calculated field .

txtSubtotal = Sum([Import])
txtTax = ([Subtotal]*10)/100
txtRetetion= IIf([Retention]=True,(([Subtotal]*4)/100),"")
txtTotal =
IIf([Retention]=True,(([Subtotal]+[txtTax])-[txtRetention]),[Subtotal]+[txtT
ax])


What I want is to put on the reports footer section the summarize grand
total of all the values returned by these calculated fields, i.e
. txtGranSubtotal would hold the summarize value of txtSubtotal
txtGranTaxt would hold the summarize value of txtTaxt
txtGranRetetion would hold the summarize value of txtRetention
txtGranTotal would hold the summarize value of txtTotal

I've always had to do something like this:

txtGranSubtotal = Sum(Sum([Import]))
txtGranTax = Sum(([Subtotal]*10)/100)
txtGranRetetion = Sum(IIf([Retention]=True,(([Subtotal]*4)/100),""))
txtTotal =
Sum(IIf([Retention]=True,(([Subtotal]+[txtTax])-[txtRetention]),[Subtotal]+[txtTax])

Tom Lake
 

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