• keywestfl9 (4/1/2009)


    if isnull(field1)

    or isnull(field2) then

    0

    else

    ToNumber((field1 / field2) * 100)

    ==========

    how do i rewrite it in the Field Expression in SSRS? Please assist me

    IIF constructions in SSRS always evaluate the entire expression, thereby resulting in the error you see.

    You can use a SWITCH instead, it'll work like a charm. Just use "1=1" as your "ELSE" condition.

    =SWITCH(

    IsNothing(Fields!Field1.Value), 0

    IsNothing(Fields!Field2.Value), 0

    1=1,ToNumber((field1 / field2) * 100)

    )

    😎