Problem with Crystal Report in c# (Windows Form).....
Posted on 2004-10-04
I am trying to use Crystal Report in windows form in C#.
If I design everything at design time and then run the program then it is coming fine. But my requirment is to get the data at run time. In this case it is not giving any error, but not showing the report also. Repost viewer is blank.
Following is the snippet which, I am using.
Here EstimatedHikeDetails is report class.
EstimatedHikeDetails rptEstimate = new EstimatedHikeDetails();
SqlDataAdapter sqlAdapt = new SqlDataAdapter(" select * from estimatedresourcedetails ",sqlConn);
DataSet dsNew = new DataSet();
crystalReportViewer2.ReportSource = rptEstimate;
Is this the correct way or wrong. And if this is wrong then can you please help me out...