How can i set the Connection Info of my report ?
I got the following code to load the report
Dim stireport1 As New Stimulsoft.Report.StiReport
stireport1.Load(path) ' where path is the path of the report
how can i now set the connection of the report ?. in the report is saved trusted connection to a server.
i need to set manually another server for the data etc. ?
thx for you help
How to set the Connection Info of the Report ?
How to set the Connection Info of the Report ?
Hi,
If you need to change the connection string for an SQL Server Database at runtime in the report you can do the following:
Where "MY_DB_NAME" is the name of the Connection source in your report.
If you need to change the connection string for an SQL Server Database at runtime in the report you can do the following:
Code: Select all
Stimulsoft.Report.Dictionary.StiSqlDatabase sqlDB = report.Dictionary.Databases["MY_DB_NAME"] as Stimulsoft.Report.Dictionary.StiSqlDatabase;
if(sqlDB != null)
{
sqlDB.ConnectionString = "My Connection String";
}
How to set the Connection Info of the Report ?
Thx, that worked fine.