[{"id":"840f0737-df1d-47ae-bb0a-359b01fe0608","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"d5d9cdef-8854-4505-89be-a2bbc3cb4482","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"3dc3dd55-35b0-4d23-bf62-47bc3650e4ee","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"80d84fbc-d0f8-4e4a-947f-e3e4de9b49b2","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"9152b7ca-0186-4fe3-a26f-5a05f322db07","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]}]
        
(Showing Draft Content)

IIF函数示例

IIF 函数是最常用的流程函数,根据第一个参数的结果逻辑值(真/假),返回第二个或第三个参数的值。

报表中许多行为控制都是通过IIF函数来实现的:

示例一

报表外观的条件格式化中用到的表达式为 {IIF(订单金额 > 1000, "Green", "White")} ,实现了当订单金额大于1000时,文本框背景会自动显示为绿色的效果。

效果如下图所示,详情请参见条件格式化

image2019-5-9_14-14-17.jpg

示例二

在IsNothing函数示例中用到的表达式为 {IIF(IsNothing(@p1), "未输入参数值", @p1)} ,实现了如果未输入参数,报表内容则显示“未输入参数值”;如果输入了参数,报表内容则显示出参数值的效果。

详情请参见IsNothing函数示例