Page 1 of 1

Check the value in text field

Posted: Mon Jul 12, 2021 8:43 am
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?

Re: Check the value in text field

Posted: Mon Jul 12, 2021 12:27 pm
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.

Re: Check the value in text field

Posted: Mon Jul 12, 2021 3:21 pm
by Kwokhei
I am new to Stimusoft,

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

Thanks

Re: Check the value in text field

Posted: Mon Jul 12, 2021 9:49 pm
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.