Page 1 of 1

How to turn off Condition Setting of a component dynamically

Posted: Fri Jun 28, 2013 9:18 am
by sylee
Hi,

I'm evaluating your reporting tools and trying out some of the features programmatically using C#.Net.

I have a StiText control in my report with some conditions set.
In the condition dialog, we can turn off the condition setting by uncheck "Component is Enabled" checkbox.

How can I turn on and off the condition setting dynamically during my page_load event in C#.Net environment?

Please advice.

Thank You.

Re: How to turn off Condition Setting of a component dynamic

Posted: Mon Jul 01, 2013 10:34 am
by Alex K.
Hello,

Please try to use the following code:

Code: Select all

...
StiText text = report.GetComponentByName("Text1") as StiText;
((StiCondition)text.Conditions[0]).Enabled = false;
...
Thank you.