How to restrict user from creating new datasources (dictionary) in Designer and only use available connection
-
- Posts: 25
- Joined: Wed Mar 12, 2025 9:44 pm
How to restrict user from creating new datasources (dictionary) in Designer and only use available connection
Hi.
I want to have a predefined MSSQL datasource (from app.settings) connection string to be used for Reports (Viewing and Designing).
How can I add a MSSQL connection string from code behind in .Net 8 Blazor Server application and hide add data source option from designer for users ?
I want to have a predefined MSSQL datasource (from app.settings) connection string to be used for Reports (Viewing and Designing).
How can I add a MSSQL connection string from code behind in .Net 8 Blazor Server application and hide add data source option from designer for users ?
-
- Posts: 990
- Joined: Tue Sep 07, 2021 10:11 am
Re: How to restrict user from creating new datasources (dictionary) in Designer and only use available connection
Hello,
You can try to use the following code to create a datasource from the code and add it to the report:
And you can use the following code to hide add datasource option:
Thank you.
You can try to use the following code to create a datasource from the code and add it to the report:
Code: Select all
var sqlDatabase = new StiSqlDatabase("MS SQL Connection", "connectionString");
report.Dictionary.Databases.Add(sqlDatabase);
Code: Select all
private StiBlazorDesignerOptions Options = new StiBlazorDesignerOptions()
{
Dictionary = {
PermissionDataSources = Stimulsoft.Report.Web.StiDesignerPermissions.View
}
};
Thank you.
-
- Posts: 25
- Joined: Wed Mar 12, 2025 9:44 pm
Re: How to restrict user from creating new datasources (dictionary) in Designer and only use available connection
it is still letting me create new dictionary please see attached. I want to eliminate new dictionary and save as dictionary option to prevent user from creating new dictionaries.
- Attachments
-
- New Dictionary.png (40.33 KiB) Viewed 1004 times
-
- Posts: 990
- Joined: Tue Sep 07, 2021 10:11 am
Re: How to restrict user from creating new datasources (dictionary) in Designer and only use available connection
Hello,
We would need more time to get an answer for you.
We will let you know when we get any results.
Thank you.
#17466
We would need more time to get an answer for you.
We will let you know when we get any results.
Thank you.
#17466
-
- Posts: 990
- Joined: Tue Sep 07, 2021 10:11 am
Re: How to restrict user from creating new datasources (dictionary) in Designer and only use available connection
Hello,
Please check the attached sample project.
Thank you.
Please check the attached sample project.
Thank you.
- Attachments
-
- NET 8.0.zip
- (457.06 KiB) Downloaded 97 times