Newbie, 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:
txtSubtotal = Sum([Import])
txtTax = ([Subtotal]*10)/100
txtRetetion= IIf([Retention]=True,(([Subtotal]*4)/100),"")
txtTotal =
IIf([Retention]=True,(([Subtotal]+[text35])-[Text37]),[Subtotal]+[text35])

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

Duane Hookom

Aren't Import, Subtotal, and Retention fields in your report's record
source? You should be able to use the same expressions in the report footer
that you use in the group header/footer.

You haven't provided any information on what text35 and Text37 are from?
 
V

verci

ok , 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 .

text35 = txtTax and Text37 = txtRetention so the IIF clause would be:

IIf([Retention]=True,(([Subtotal]+[txtTax])-[txtRetention]),[Subtotal]+[txtT
ax])

thanks!!!!!

Duane Hookom said:
Aren't Import, Subtotal, and Retention fields in your report's record
source? You should be able to use the same expressions in the report footer
that you use in the group header/footer.

You haven't provided any information on what text35 and Text37 are from?

--
Duane Hookom
MS Access MVP
--

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:
txtSubtotal = Sum([Import])
txtTax = ([Subtotal]*10)/100
txtRetetion= IIf([Retention]=True,(([Subtotal]*4)/100),"")
txtTotal =
IIf([Retention]=True,(([Subtotal]+[text35])-[Text37]),[Subtotal]+[text35])

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

Duane Hookom

In any group or report header or footer, you should get totals using fields
from your report's record source. Don't create an IIf() function that might
return a number or might return a string ("").

Rather than referencing control names in your expressions, use the control
sources from those controls.

You didn't suggest how [Subtotal] is derived.

--
Duane Hookom
MS Access MVP
--

verci said:
ok , 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 .

text35 = txtTax and Text37 = txtRetention so the IIF clause would be:

IIf([Retention]=True,(([Subtotal]+[txtTax])-[txtRetention]),[Subtotal]+[txtT
ax])

thanks!!!!!

Duane Hookom said:
Aren't Import, Subtotal, and Retention fields in your report's record
source? You should be able to use the same expressions in the report footer
that you use in the group header/footer.

You haven't provided any information on what text35 and Text37 are from?

--
Duane Hookom
MS Access MVP
--

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:
txtSubtotal = Sum([Import])
txtTax = ([Subtotal]*10)/100
txtRetetion= IIf([Retention]=True,(([Subtotal]*4)/100),"")
txtTotal =
IIf([Retention]=True,(([Subtotal]+[text35])-[Text37]),[Subtotal]+[text35])

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
 

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