Hi, I have the report with lots of sub-reports within.
How can I walk through the collection of sub-reports in main report? I need this to change the data source for each sub report.
TIA
Hi, I have the report with lots of sub-reports within.
How can I walk through the collection of sub-reports in main report? I need this to change the data source for each sub report.
TIA
Edited per CodeByMoonlight comment - I haven't tested this yet, but it should be way better than my original.
ReportDocument reportDocument = new ReportDocument();
reportDocument.Load(...);
foreach (ReportDocument subreportDocument in reportDocument.Subreports) {
// do something here
}