Seal Report Forum
»
General
»
General Discussions/Other
»
How to change database connection at runtime?
Rank: Newbie
Groups: Registered
Joined: 9/18/2019(UTC) Posts: 0 Location: surat Thanks: 1 times
|
Hi All,
I have one query while integrating seal report in asp.net mvc application.
I have created multi-tenant web application.
At the time of login,we will fetch database connection string and put that connectionstring in session and use it in all other places.
Now I want to implement same logic for seal report.
I have integrated seal report with my asp.net mvc application with fix database connection string.
Now I want to change connectionstring for that seal report at runtime?
Is it any possible for above query?
Any help will be very grateful for me.
With Regards,
Karan Shah
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
You can do that a different places and either in the report Sources or in the Models. In the main configuration, you have the "Report Execution Init Script" that will apply to all report (Server Manager->Configuration) Or per report, just create a Task that does the job. Or you can do it per model in the model "Per Load Script"... Here are the objects from a Report: report.Sources[0].Connections[0].ConnectionString = ""; report.Models[0].Connection.ConnectionString = ""; You can also change the repository sources: repository.Sources[0].Connections[0].ConnectionString = ""; This can be done in the Login Script of your security provider (Server Manager->Configure Web Security->Custom Security Script). Check https://sealreport.org/SourcesObjects: https://sealreport.org/H...5c-2fb4-831f151b72a7.htm
|
|
|
|
Seal Report Forum
»
General
»
General Discussions/Other
»
How to change database connection at runtime?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.