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

新手上路,请多包涵

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

阅读 3.8k
1 个回答

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"))

更多Stimulsoft Reports.Net相关的问题可以参考:Stimulsoft Reports.Net常见Q&A

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进