如何检查rdlc表达式中的多个条件 [英] How to check multiple conditions in rdlc expression
本文介绍了如何检查rdlc表达式中的多个条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只处理了rdlc表达式值中可能的2个值,例如
I have worked on only possible 2 in rdlc Expression values as like
=iif((Fields!Gender.Value="1"),"Male","Female")
在这里,我只能使用两种可能性.但是,如果我想检查3个或更多条件,怎么办?
Here I can work with only 2 possibilities. But if I want to check 3 or more conditions than how can I?
推荐答案
如果您有更多条件,请使用开关,它也更具可读性.
Use the Switch if you have more conditions, it is also more readable.
=Switch(
Fields!Gender.Value = 1, "Male",
Fields!Gender.Value = 2, "Female"
)
这篇关于如何检查rdlc表达式中的多个条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文