Reputation: 1445
I need to add a sub report to a section dynamically. Is there a way of doing it?
Thanks in advance.
Upvotes: 2
Views: 1913
Reputation: 3788
If you have a ReportDocument object, you can use the ReportClientDocument-API to add a new subreport like this (example for page footer):
report.ReportClientDocument.SubreportController.ImportSubreportEx("Test", @"C:\test-sub.rpt", report.ReportClientDocument.ReportDefController.ReportDefinition.PageFooterArea.Sections[0], left, top, width, height);
Upvotes: 2