How to turn off Condition Setting of a component dynamically

Stimulsoft Reports.NET discussion
Post Reply
sylee
Posts: 1
Joined: Mon Jun 24, 2013 1:14 am

How to turn off Condition Setting of a component dynamically

Post 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.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

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

Post 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.
Post Reply