Check the value in text field

Stimulsoft Dashboards.WEB discussion
Post Reply
Kwokhei
Posts: 4
Joined: Sat Jul 10, 2021 1:24 pm

Check the value in text field

Post by Kwokhei »

I have a report in below, the display value of Text37 in PageHeader will be changed depending on the value showing in Text8 in DataBand.

PageHeader1
Text37

DataBand1
Text8

How can I set in Text37 in PageHeader1, if Text8 is "A" show 'Successful' else 'Failed'?

1. I tried to set in Text37, {IIF(Text8.text=="a","Successful","Failed")}, but when I click the 'check' button, it will show 'Field, Method or Property not found:text",
Can you please advice how to fixe this?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Check the value in text field

Post by HighAley »

Hello,

Are you using the Dashboards or Reports?
You are writing in the Dashboards section but there are no page headers in the dashboards.
Which our product do you use?

Thank you.
Kwokhei
Posts: 4
Joined: Sat Jul 10, 2021 1:24 pm

Re: Check the value in text field

Post by Kwokhei »

I am new to Stimusoft,

I think it is report and I will post my questions in there.

Thanks
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Check the value in text field

Post by Lech Kulikowski »

Hello,

During the report, rendering exists two instances of each component (minimum two instances). One instance - component in the report template. Second instance - component which created the rendered report. During the creation of the second instance, report engine calculates expressions and write it to the second instance. When you write code like this:
Text23.Text = "test";
you call instances from report template which does not contain calculated values from expressions.

You can:
1. Instead of "{Text1.TextValue}" expression using the same expression as in Text1.Text property, or
2. Use variables. In this case, you can calculate value in variable, and then use this variable in expressions.

Thank you.
Post Reply