IF {Field_A} = 0 THEN 0 ELSE (({Field_B} / {Field_A})*100)
I am trying to convert this formula to an SSRS expression. I have tried many different =IFF
statements, but cannot seem to get it to run correctly.
IF {Field_A} = 0 THEN 0 ELSE (({Field_B} / {Field_A})*100)
I am trying to convert this formula to an SSRS expression. I have tried many different =IFF
statements, but cannot seem to get it to run correctly.
Almost a duplicate question: if you search here for #error ssrs iif
you'll get plenty of results, such as Does the iif function compute both paths in SSRS or is it short-circuited?
Rewriting you statement is straightforward then:
=IIF(
Fields!Field_A.Value = 0,
0,
Fields!Field_B.Value /
IIF( Fields!Field_A.Value = 0, 1, Fields!Field_A.Value) * 100 )
If you have several formulas to convert, it is OK to do manually. However when you have quite a few complicated formulas to convert from Crystal to SSRS, you need a conversion tool to help. Please try Crystal Migration Services. Formulas like this canc be perfectly automatically converted. Free sample conversion is also available for you to evaluate.