Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need to generate 5 reports using single microsoft report viewer.... right now for each report i am using separate microsoft report viewer control its too difficult to handle so anyone help me
Posted
Updated 17-Feb-13 4:06am
v2

1 solution

for each report i am using separate microsoft report viewer control
Why so? Just place/use one viewer and change the source of report to it as per need. You would need to define the report for the viewer at runtime as defined by you.

C#
//This code will define a report at runtime

//Winforms
reportViewer1.Reset();
reportViewer1.LocalReport.ReportEmbeddedResource = "WindowsApplication1.Report1.rdlc";
this.reportViewer1.RefreshReport();

//Webforms
reportViewer1.Reset();
reportViewer1.LocalReport.ReportEmbeddedResource = MapPath("Report1.rdlc");
this.reportViewer1.RefreshReport();
 
Share this answer
 
v4
Comments
selva_1990 17-Feb-13 10:28am    
i am trying reply u soon ji :)

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900