Hide Controls dynamically in a report

Stimulsoft Reports.WEB discussion
Post Reply
Rajesh Tanwar
Posts: 14
Joined: Thu May 14, 2009 2:06 am

Hide Controls dynamically in a report

Post by Rajesh Tanwar »

Hi All,

I've few control on the stimulsoft report , which I want to hide (on some condition) panels or any other container dynamically before displaying the report.
As of now I've followed the following approach:

Code: Select all

 StiComponentsCollection components = report.GetComponents();
            foreach (StiComponent item in components)
            {
                if ((item is StiPanel) && (item.Name.ToLower() == "panel4"))
                {
                    item.Enabled = false;
                }            
            }
Here controls are successfully hidden. But there comes an empty space after hiding the panel.
I want that containers/controls below this panel should move up automatically to fill up the empty space.
For example, in asp.net.... we use

Code: Select all

controlId.visible = false
to hide a control and there is no empty space after hiding.

Moreover, I also want to know that "can we apply the hiding logic at design (in stimulsoft designer) time also?".

Thanks & Regards,
Rajesh Tanwar
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Hide Controls dynamically in a report

Post by Jan »

Hello Rajesh,
I want that containers/controls below this panel should move up automatically to fill up the empty space.
You can use DockStyle property.
I also want to know that "can we apply the hiding logic at design (in stimulsoft designer) time also?".
You can use Conditions property of components.

Thank you.
Post Reply