Click here to Skip to main content
Licence CPOL
First Posted 17 Jun 2008
Views 47,922
Downloads 1,435
Bookmarked 33 times

Multiple Reports with a single Report Viewer Control

By Gurpreet111 | 17 Jun 2008 | Unedited contribution
C#
Using this You can embed different reports to a single report viewer control
9 votes, 60.0%
1

2
1 vote, 6.7%
3
1 vote, 6.7%
4
4 votes, 26.7%
5
2.00/5 - 15 votes
μ 2.00, σa 3.23 [?]

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)

About the Author

Gurpreet111

Software Developer
Tarkia
India India

Member
He works on c#.net with TARKIA

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionHOW TO OPEN MULTIPLE CRYSTAL REPORT VIEWER AT THE SAME TIME? Pinmembernomi9hrs 19mins ago 
GeneralMy vote of 1 Pinmemberrzl2070622:44 3 Aug '11  
Generaluse of multiple reports.rdlc files into a single reportviewer. PinmemberMember 78331420:55 13 Apr '11  
GeneralHelped me PinmemberMaultier3:53 4 Mar '11  
GeneralMy vote of 1 PinmemberMember 20603815:45 17 Feb '11  
GeneralMutiple Reports in Single ReportViewer PinmemberMember 83070518:58 26 Jan '09  
GeneralRe: Mutiple Reports in Single ReportViewer PinmemberGurpreet11120:26 16 Feb '09  
QuestionCan we subscribe the server side report through code? PinmemberPrashant.IGT0:20 15 Dec '08  
Questionhow to show multipal reports on reportviewer at a time Pinmembershashank2107722:21 14 Oct '08  
GeneralProblem [modified] PinmemberTheCrow756:12 4 Sep '08  
QuestionHow do Pinmembervb_buddy3:03 7 Aug '08  
AnswerRe: How do PinmemberGurpreet1110:12 2 Sep '08  

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.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120209.1 | Last Updated 17 Jun 2008
Article Copyright 2008 by Gurpreet111
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid