Click here to Skip to main content
11,411,097 members (63,132 online)
Rate this: bad
good
Please Sign up or sign in to vote.
Hi Frnds,
In my Web Application,I am going to generate multiple Reports for different purpose.How to use single crystalreportviewer to show all the reports whenever i need.Is it possible or not.Using Separate crystalreportviewer for every Report is good or single crystalreportviewer for All Report.Give Some Examples.
Posted 27-Dec-12 19:58pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

generate multiple Reports for different purpose.How to use single crystalreportviewer
Well, that's the general way - have one reportviewer and show the needed report in it. All you have to do is define the reportviewer source report at runtime.

Viewer is a control that will show a report that we ask it to. You can change the report as per need for the single viewer. You will view one report at a time as defined by you in it.

Example:
ReportDocument _rdStudents = new ReportDocument();
string reportPath = Server.MapPath("Students_CrystalReport.rpt");
_rdStudents.Load(reportPath);
	 
_rdStudents.SetDataSource(dt);
CrystalReportViewer1.ReportSource = _rdStudents;
If needed refer: Runtime dynamically bind data into a crystal report using Asp.net C#[^]
  Permalink  
Comments
Vani Kulkarni at 28-Dec-12 4:52am
   
Crisp and clear information! ::thumbsup:: 5+
Sandeep Mewara at 28-Dec-12 6:12am
   
Thanks Vani :)

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 8,920
1 OriginalGriff 6,918
2 Maciej Los 3,390
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web04 | 2.8.150414.5 | Last Updated 28 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100