Embed SSRS Subreport into Main Report
Is it possible to Embded a subreport into the main SSRS report, such that when i execute the main report subreport also gets loaded and executed (Local Reports).
In my application RDLs are stored in the database and when executed, RDL is fetched from Database and loaded in SSRS Report Viewer Locally. This concept will not w开发者_如何学运维ork if i have sub reports. I can load the Subreports in the database and link those to the main report, but was looking if i can just simply embed the report in the Main Report.
I think this is possible BUT you need to give the reportviewer the subreports definition and the necessary datasources.
ReportViewer.LocalReport.LoadSubreportDefinition(def);
And then somehow assign datasources, I haven't done this before but I hope that might point you in the right direction.
We can publish report parts, then assemble the various parts into a report. Report parts can be called by multiple reports. This is different than drilling down in to sub-reports. Drill down is much easier, but does not serve your purpose. See the article below, it is very helpful.
http://www.bidn.com/blogs/PatrickLeBlanc/ssis/671/sql-server-reporting-services-r2-publishing-report-parts
精彩评论