How to check multiple conditions in rdlc expression

Sonam Mohite picture Sonam Mohite · Jul 25, 2012 · Viewed 66k times · Source

I have worked on only possible 2 in rdlc Expression values as like

=iif((Fields!Gender.Value="1"),"Male","Female")

Here I can work with only 2 possibilities. But if I want to check 3 or more conditions than how can I?

Answer

Muhammad Omar ElShourbagy picture Muhammad Omar ElShourbagy · Mar 17, 2013

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 expression iif use?