|
How can I generate this single record in my crystal reports upon typing the member number in a textbox and clicking "generate report" button?
I know how to connect it to the database, and dragging the needed fields in the details view of the crystal reports. I'm also using stored proc. But when I load it, it has no output..
where I went wrong?
More info:
I have no behind code in my .cs....
I decided to have a textbox and a button instead of having the built in parameter field prompt upon running the aspx. It's not pleasant to the eyes.
I'm using asp.net in visual studio 2008 and sql server 2005 in my databse
Kapil KumarPosted Jan 27, 2011, 2:28 AM
1.Make a DataSet with your Fields
Right Click on solution -> Add New Item -> DataSet(name-: dsMemberDetail)
2.Add columns to DataSet
3.Make dsMemberDetail as Source of Report
4.design the report
//-------------------------------------------------------------
//in the cs file (in the click event of button)
dsMemberDetail ds=new dsMemberDetail();
SqlDataAdapter da=new SqlDataAdapter("Select Member_No,Member_Name,Member_age,_Member_position from
//or what ever criteria you want
da.fill(ds);
//make a report object
//for eg report name is rptDetail.
rptDetail rd=new rptDetail();
rd.setDataSource(ds);
crystalReportViewer1.ReportSource=rd;