在Stimulsoft Reports.Net运行时修改报表的连接字符串

怎么在Stimulsoft Reports.Net运行时修改报表的连接字符串?怎么改呀

C#

StiReport report = new StiReport();

report.Load("MyReport.mrt");

report.Dictionary.Databases.Clear();

report.Dictionary.Databases.Add(new StiSqlDatabase("MyDatabase", "new connection string"));

VB

Dim Report As New StiReport

Report.Load("MyReport.mrt")

Report.Dictionary.Databases.Clear()

Report.Dictionary.Databases.Add(New StiSqlDatabase("MyDatabase", "new connection string"))

 

 

posted @ 2019-06-03 15:19  DarJeely  阅读(445)  评论(0编辑  收藏  举报