switch

Stimulsoft Reports.NET discussion
Post Reply
mhf
Posts: 20
Joined: Wed Jun 20, 2012 5:29 am
Location: wg

switch

Post by mhf »

Hi
Please top correct the code.
I'm Thank you your example
{switch
(RatingPost.UserName == "fakhravary","Test Example 1",
RatingPost.UserName == "sareh_tt","Test Example 2")}
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: switch

Post by HighAley »

Hello.

You should write Switch().
It's case sensitive.

Thank you.
mhf
Posts: 20
Joined: Wed Jun 20, 2012 5:29 am
Location: wg

Re: switch

Post by mhf »

I'm not familiar with the structure
Thanks, I'll take a full sample
{
Switch("software")
case "1":
return "aa";
case "2":
return "bb";
case "3":
return "cc";
}
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: switch

Post by HighAley »

Hello.

You could fine a description if the Switch function in the Text Editor.
object Switch (condition1, value1, condition2, value2, ...)

The Switch evaluates the expressions from left to right, and returns the value associated with the first expression to evaluate to True. If all of the expressions are False, then Switch returns null.

Parameters
Condition1, condition2, and so on are Boolean expressions. value1, value2, and so on are the possible values that may be returned.

Return Value
One of the values in the value list value1, value2, and so on.
SwitchDescription.png
SwitchDescription.png (64.98 KiB) Viewed 2206 times
Thank you.
Post Reply