# Calculate report Total where subtotal uses IIf function

G

#### Guest

I have a report where the individual lines of data contain EITHER value in
Euros or in Pounds Sterling. I use the IIf function to either calculate a
sales cost using an echange rate in the database and quantity of items OR if
it is not in Euros to simply calculate the cost times the quantity. The
Subtotal calculation works well.

In the fotter of the section I want to calculate the sum of all the
subtoatal; However I cannot get = Sum ([Subtotal]) to work. I have tried to
use the IIf expression in the same way as above but I can't get this to work
either. The format of the Subtotal and Total Fields are 'Currency'.

CAn anyone help!

G

#### Guest

Hi Mannie

Don't sum the [subtotal] but simply =sum([FieldName])

Hope this helps

G

#### Guest

Hi Wayne

No Joy with your suggestion. Subtotal is the field name. If I use the
function =Sum([Subtotal]) then when I runthe report I get a text box with
ENTER PARAMETER VALUE Subtotal.
I have also changed the name of the field to see if it makes any difference,
I get the same result.
--
Thanks

Mannie G

Wayne-I-M said:
Hi Mannie

Don't sum the [subtotal] but simply =sum([FieldName])

Hope this helps

--
Wayne
Manchester, England.

Mannie G said:
I have a report where the individual lines of data contain EITHER value in
Euros or in Pounds Sterling. I use the IIf function to either calculate a
sales cost using an echange rate in the database and quantity of items OR if
it is not in Euros to simply calculate the cost times the quantity. The
Subtotal calculation works well.

In the fotter of the section I want to calculate the sum of all the
subtoatal; However I cannot get = Sum ([Subtotal]) to work. I have tried to
use the IIf expression in the same way as above but I can't get this to work
either. The format of the Subtotal and Total Fields are 'Currency'.

CAn anyone help!