|
-
Sep 28th, 2004, 05:27 AM
#1
Thread Starter
Lively Member
crystal report in ASP.net
hai,
im using Crystal report in my asp.net page. wat is the concept and how to display crystal report in asp page.
plase provide me some good examples on crystal report
v.r.mahendran
-
Oct 6th, 2004, 02:36 AM
#2
Addicted Member
Re: crystal report in ASP.net
Originally posted by mahivr
hai,
im using Crystal report in my asp.net page. wat is the concept and how to display crystal report in asp page.
plase provide me some good examples on crystal report
v.r.mahendran
Well.. For using crystal report we need to have typed dataset on the page. First create a new connexion (say con) , dataadapter(say daEx) and typed dataset ( say dsEx1).
Then Design a Crystal Report and add it to your project. This can be done using the Add New Item in the Project Menu. In the resulting dialog select the CrystalReport Option ( The Crystal Report comes with Visual Studio .Net U dont need to install anything). A wizard will be poped up to ghuide you thru the process of creating the report. Say teh Name of the Crystal Report is CrystalReport1.rpt.
Then place a CrystalReportViewer Control ( found in the toolbox --> WebControls Tab say CrystalReportViewer1) on to your form. Donot make any changes to the properties of the CrystalReportViewer Control.
Then place a reportDocument Control (found in the Components tab of the toolbox say reportDocument 1) on the form.
Whenever u want to show the report letus say in button1 click event write
reportDocument1.Load(MapPath("CrystalReport1.rpt"))
reportDocument1.SetDataSource(dsEx1)
CrystalReportViewer1.ReportSource = reportDocument1
That it u r done with showing crystal report.
Note: If you r using .Net 2002 U might get a NullReference Exception. The only thiing I know to get rid of this exception is to upgrade to .Net 2003
Cute Member 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|