Okay so I am trying to do math in this IIF statement in reportviewer. However, all it does is return FALSE in my field. Am I able to do math with an IIF statement or what?
=IIF(
UCase(Fields!Tax.Value) = "YES",
Variables!DeptTotal.Value =+(Fields!TotalPriceWithoutTax.Value * (1 + Parameters!Tax.Value)),
Variables!DeptTotal.Value =+ (Fields!TotalPriceWithoutTax.Value)
)
Any Ideas? Thanks in advance.
EDIT:
Okay Guys,
I even did a custom codes and it still returns false.
Public Function Taxable(Answer AS String, DepartTotal AS Decimal, TotalWithoutTax AS Decimal, Tax AS Decimal) AS Decimal
If UCase(Answer) = "YES" Then
DepartTotal += TotalWithoutTax * Tax
Else
DepartTotal += TotalWithoutTax
End If
Return DepartTotal
End Function
Any other sugguestions?
Thanks Again.
EDIT:
This is my taxable function call:
=Code.Taxable(Tax, DepartTotal, TotalWithoutTax, txtTax.value)