Convert Crystal Reports formula to SSRS expression

懵懂的女人 提交于 2019-12-12 07:04:35

问题


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.


回答1:


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 )



回答2:


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.

http://www.crystalmigrater.com/Default.aspx



来源:https://stackoverflow.com/questions/16217610/convert-crystal-reports-formula-to-ssrs-expression

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!