Disable Connectors

Stimulsoft Reports.NET discussion
Post Reply
IKRAM
Posts: 7
Joined: Wed Aug 04, 2010 3:56 am

Disable Connectors

Post by IKRAM »

hello
I wanted to disable display connectors OLEDB, SQL
ODBC connection and leave only the xml in the window "choose
type of connection "that appears after clicking the" New Connection ".
thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Disable Connectors

Post by Alex K. »

Hello,

You can use next code:

Code: Select all

Stimulsoft.Base.Services.StiServiceContainer services = Stimulsoft.Report.StiConfig.Services.GetServices(
           typeof(Stimulsoft.Report.Dictionary.StiDatabase));
foreach (Stimulsoft.Base.Services.StiService service in services)
{
        if (service is Stimulsoft.Report.Dictionary.StiXmlDatabase) continue;
        service.ServiceEnabled = false;
}
Thank you.
IKRAM
Posts: 7
Joined: Wed Aug 04, 2010 3:56 am

Disable Connectors

Post by IKRAM »

Thank you very much.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Disable Connectors

Post by Andrew »

Have a nice day!
Post Reply