Introduction

Single Report viewer control can be embedded with multiple ReportsDownload the above file for the source code of this project.

Using the code

This code block demonstrates adding of 2 reports to a single report viewer control.If you have an application in which you are displaying large data in reports and on the same page you need more than one report, instead of adding multiple report viewer controls for different reports. You can add reports one by one to a single report viewer control.

//Add this code to embed a report at runtime
reportViewer1.Reset();
reportViewer1.LocalReport.ReportEmbeddedResource = "ReportViewer.Report2.rdlc";
this.reportViewer1.RefreshReport();
//reportViewer1--> A Report Viewer Control//ReportViewer --> Name of the solution//Report2.rdlc --> Name of the report

Instead of adding a report to the control using the graphical user interface, add it during the runtime so that after reseting the report viewer control you can add more reports to it.