RDLC表达式Switch使用? [英] RDLC expression Switch use?

查看:213
本文介绍了RDLC表达式Switch使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

=Switch(
    Fields!C2.Value = "","",
    Fields!C2.Value > 0,Fields!SeqNo.Value
    )



这是什么语法?





我不会比较变量如




What is the syntax for this?


I wont to compare variable like

if(C2 ==" ")
   {
    C2.Value = empty
   }
   else
   {
    C2.Value = Fields!SeqNo.Value
   }

推荐答案

您的代码似乎没问题,但如果两个条件都不匹配怎么办?我已经为最终条件添加了默认值。

your code seems OK but what if both conditions not match? I have added default value for final condition.
=Switch(
    IsNumeric(Fields!C2.Value) and  Fields!C2.Value > 0, Fields!SeqNo.Value,
    1=1, Fields!C2.Value
    )





更新:


以下




UPDATE:

for below:

if(C2 ==" ")
   {
    C2.Value = empty
   }
   else
   {
    C2.Value = Fields!SeqNo.Value
   }





尝试



try

=Switch(
    Fields!C2.Value = " ", "",
    1=1, Fields!C2.Value
    )


这篇关于RDLC表达式Switch使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆