IIF does not seem to work properly in SSRS
Hi,
Has anyone ever encounter strange situation whereby, the formula is not working when i specify in my SSRS for a field,
IIF(Fields!Currency.Value= "SGD", Fields!FBill.Value, Fields!Bill.Value)
It only pick up Fields!Bill.Value, even tho' the currency is 'SGD'????
In my stored procedure, the above 2 variable is numeric, null.
December 30th, 2010 3:44am
There might be any spaces after "SGD", give a try for the below expression and let us know if the issue still exists.
=IIF(TRIM(Fields!Currency.Value) = "SGD", Fields!FBill.Value, Fields!Bill.Value)
=IIF(LEFT(Fields!Currency.Value, 3) = "SGD", Fields!FBill.Value, Fields!Bill.Value)
Hope its helpful....Pavan Kokkula Tata Consultancy Services.
Free Windows Admin Tool Kit Click here and download it now
December 30th, 2010 4:38am
Thanks for the solution, it works only when i use
=IIF(LEFT(Fields!Currency.Value, 3) = "SGD", Fields!FBill.Value, Fields!Bill.Value)
instead of TRIM.
December 30th, 2010 11:14pm