我想使用下面的代码在运行时更改数据源位置;我有一个关于使用此代码的问题:此代码是否更改报表子报表的所有数据源位置?肿瘤坏死因子;
ReportDocument doc = new ReportDocument();
doc.Load(@"C:\ReportName.rpt");
ConnectionInfo crConnection = new ConnectionInfo();
crConnection.UserID = userID;
crConnection.ServerName = datasource;
crConnection.DatabaseName = "";
crConnection.Password = password;
AssignConnectionInfo(doc,crConnection);
CrystalReportViewer1.ReportSource = doc;