Page 1 of 1

How to store values with variables using IIF

Posted: Mon May 13, 2013 6:57 am
by osched
Hi,
I have defined an integer variable RowNumber in the report dictionary:
{IIF((Events.Name=="Failure"),RowNumber=Line,"Job OK")}
which should give the number of the last row of a datalist that fulfills the boolean expression. However, the true part is returned even when the boolean expression is false and the variable RowNumber always returns the last row number of my datalist. Should I declare a different variable or change its properties?

Thanks in advance.

Oscar

Re: How to store values with variables using IIF

Posted: Mon May 13, 2013 8:54 am
by HighAley
Hello, Oscar.

The IIF() function works as any other C# function. If you call it all parameters are calculated. So it's better to use ternary operator (?:).

Thank you