Sunday, February 19, 2012

IIF expression problem

Hello all,

If anyone could give me a hand on this it would be greatly appreciated. The problem i am having is as follows: On a rdlc report I have a column which I am generating a currency value based on a nested IIF statement. What is happening is if I don't have the if statement for the column and just calculate like so : =Fields!Amount.value * 0.02 the number comes out correctly, however if I have it in the following iif statement it automatically rounds the values.

=FormatCurrency(IIF(Fields!Amount.Value = 114.00,((Fields!Amount.Value * .02)* 2),0)Or

IIF(Fields!Amount.Value = 20.00,((Fields!Amount.Value * .02) * 12),0)Or

IIF(Fields!Amount.Value = 216.00,(Fields!Amount.Value * .02),0))

Any insight would be great

Thanks

whats the datatype of Fields!Amount.value ... is it an integer or decimal

No comments:

Post a Comment