Expression in Text box causes error

Stimulsoft Reports.WEB discussion
Post Reply
Crispy Rice
Posts: 3
Joined: Sat Mar 07, 2015 6:00 pm

Expression in Text box causes error

Post by Crispy Rice »

Hi

I have a Data Band with a Text box and the following expression:

Code: Select all

{ IIF( {Results.Questions.Question_1 = "Red" } , "-20" , "0")  }
It always causes the following C# line to error

Code: Select all

 return StiMvcMobileViewer.GetReportSnapshotResult(HttpContext, stiReport);
The error is :

Code: Select all

stimulsoft error cs1513: } expected
If i remove the express this error goes away.

Please help.

Thanks,

Chris
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Expression in Text box causes error

Post by Alex K. »

Hello,

Please try to use the following code:

Code: Select all

{IIF(Results.Questions.Question_1 == "Red", "-20" , "0")}
Thank you.
Crispy Rice
Posts: 3
Joined: Sat Mar 07, 2015 6:00 pm

Re: Expression in Text box causes error

Post by Crispy Rice »

Thanks that worked :)
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: Expression in Text box causes error

Post by Andrew »

Hello,

Great! Have a nice day!
Post Reply