tags:

views:

2636

answers:

3

in rdlc i want to compare int like

 if(expression ==1)
    {

    }
    if(expression ==2)
    {
    }

work on vs05 Window C#

A: 

You will have to nest IIF statements like this:

 = IIF (expression = 1, "Is 1", IIF (expression = 2, "Is 2"))
Ben Martin
thannks now if i want to compare string then? what i do....like int Total=0if(expression=="Good") then TotalIncrease
Shamim
You cant have variables in that sense. You would nest the 'IIF' within a SUM or some other kind of aggregate function... =Sum(IIF(expression = "Good", 1, 0)). Something along those lines.
Chalkey
+6  A: 

Rather than using nested IIF statements I prefare the Switch statement.

From the MSDN...

=Switch(
    Fields!PctComplete.Value >= 10, "Green", 
    Fields!PctComplete.Value >= 1, "Blue", 
    Fields!PctComplete.Value = 1, "Yellow", 
    Fields!PctComplete.Value <= 0, "Red"
    )

Hope it helps :)

Chalkey
Thanks it's work Now i have another problem hope you help me ...I have three type board LIKE:GOOD,REMOVED,NOTFOUND.....i want a report on rdlc that show me Board type amount like belowThana Good Removed NotFoundA 5 2 4B 4 1 0how can i do that
Shamim
I'm not totally sure what you mean? Can you rephrase the the question in any way, your example has lost its formatting because its a comment.
Chalkey
A: 

Thanks,I had the same problem, and ur comment helped me :)

Mehri