Dear All,
I am new to Crystal report . I am finding a problem in Crystal report. it gives me an error when i try to bind crystal report with "Dataset" .
if anyone knows please help its urgent .
protected void Button1_Click(object sender, EventArgs e)
{
ReportDocument rpt = new ReportDocument();
rpt.Load(Server.MapPath("BilllReport.rpt"));
DataSet ds = new DataSet();
SqlConnection con = new SqlConnection("Data Source=MO02\\SQLEXPRESS;Initial Catalog=TestDatabase;Integrated Security=True");
SqlCommand cmd = new SqlCommand("select * from empdetails", con);
con.Open();
SqlDataAdapter adp = new SqlDataAdapter(cmd);
adp.Fill(ds);
rpt.SetDataSource(ds);
CrystalReportViewer1.ReportSource = rpt;
CrystalReportViewer1.DataBind();
con.Close();
}
...
Go to the complete details ...