Posted 22 November 2020, 2:14 pm EST
Hi,
In .NET Core 3.1 project, I want to change the connection string of a Report, and also its Subreport(s), i found that i could use below code to overwriten the original one :
String connStrAR = “…myConnectionString”
rpt.Report.DataSources[0].DataSourceReference = “”;
rpt.Report.DataSources[0].ConnectionProperties.DataProvider = “OLEDB”;
rpt.Report.DataSources[0].ConnectionProperties.ConnectString = connStrAR;
But i also found that i cant change its subreport connection string.
How could i do it?
Thanks