private void Form1_Load(object sender, EventArgs e) { DataSet ds = new DataSet(); ds.Tables.Add("Doctors"); Get_Doctors(); CrystalReport1 rpt = new CrystalReport1(); rpt.SetDataSource(ds); crystalReportViewer1.ReportSource = rpt; } private void Get_Doctors() { da = new SqlDataAdapter("SELECT D_Name,D_Address_L1 from doctors", Dbcon); da.Fill(ds, "Doctors"); }
rpt.SetDataSource(ds);
rpt.SetDataSource(ds.Tables[0]); OR rpt.SetDataSource(ds.Tables["Doctors"]);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)