How to disable some connections type in JS version

Stimulsoft Reports.JS discussion
Post Reply
camedinag
Posts: 3
Joined: Mon Oct 03, 2022 3:26 pm

How to disable some connections type in JS version

Post by camedinag »

Hello I found this code to disable some connections types:
StiServiceContainer services = StiConfig.Services.GetServices(typeof(StiDataAdapterService));
foreach (StiDataAdapterService service in services)
{
Type serviceType = service.GetType();
service.ServiceEnabled = !serviceType.Equals(typeof(StiSqlAdapterService)) && !serviceType.Equals(typeof(StiOleDbAdapterService));
}

How to code this for JS version ??

Thanks
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: How to disable some connections type in JS version

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
#8330
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: How to disable some connections type in JS version

Post by Lech Kulikowski »

Hello,

You can use the following code:

Code: Select all

let databases = StiOptions.Services.databases;
databases.clear();
databases.add(new Stimulsoft.Report.Dictionary.StiFirebirdDatabase());
databases.add(new Stimulsoft.Report.Dictionary.StiMySqlDatabase());
databases.add(new Stimulsoft.Report.Dictionary.StiSqlDatabase());
Thank you.
camedinag
Posts: 3
Joined: Mon Oct 03, 2022 3:26 pm

Re: How to disable some connections type in JS version

Post by camedinag »

But in JS don't have a StiOptions class
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: How to disable some connections type in JS version

Post by Lech Kulikowski »

Hello,

What version are you use?
Please check the last release build version.

Thank you.
camedinag
Posts: 3
Joined: Mon Oct 03, 2022 3:26 pm

Re: How to disable some connections type in JS version

Post by camedinag »

2022.4.1
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: How to disable some connections type in JS version

Post by Lech Kulikowski »

Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.
Post Reply