Click here to Skip to main content
Click here to Skip to main content

Tagged as

Multiple Reports with a single Report Viewer Control

, 17 Jun 2008
Rate this:
Please Sign up or sign in to vote.
Using this You can embed different reports to a single report viewer control

Introduction

Single Report viewer control can be embedded with multiple Reports
Download 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.

If any queries, post your comments, i will be glad to reply.

Reference: http://aspalliance.com/762

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Gurpreet111
Software Developer Tarkia
India India
He works on c#.net with TARKIA

Comments and Discussions

 
QuestionHOW TO OPEN MULTIPLE CRYSTAL REPORT VIEWER AT THE SAME TIME? Pinmembernomi9-Feb-12 21:30 
GeneralMy vote of 1 Pinmemberrzl207063-Aug-11 21:44 
Generaluse of multiple reports.rdlc files into a single reportviewer. PinmemberMember 783314212-Apr-11 23:55 
GeneralHelped me PinmemberMaultier4-Mar-11 2:53 
GeneralMy vote of 1 PinmemberMember 206038117-Feb-11 4:45 
GeneralMutiple Reports in Single ReportViewer PinmemberMember 83070526-Jan-09 17:58 
GeneralRe: Mutiple Reports in Single ReportViewer PinmemberGurpreet11116-Feb-09 19:26 
QuestionCan we subscribe the server side report through code? PinmemberPrashant.IGT14-Dec-08 23:20 
Questionhow to show multipal reports on reportviewer at a time Pinmembershashank2107714-Oct-08 21:21 
GeneralProblem [modified] PinmemberTheCrow754-Sep-08 5:12 
QuestionHow do Pinmembervb_buddy7-Aug-08 2:03 
AnswerRe: How do PinmemberGurpreet1111-Sep-08 23:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 17 Jun 2008
Article Copyright 2008 by Gurpreet111
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid