cnn.Open(); DataTable dt1 = new DataTable(); dt1 = Dt_Args("select EmpNameC from ShiftTable where dated'01/Oct/2014'and empcodeC='18'"); // Dt_Args method to execute datatable DataSet ds = new DataSet(); ds.Tables.Add(dt1); objRpt.SetDataSource(ds); crystalReportViewer1.ReportSource = objRpt; crystalReportViewer1.Refresh();
ReportDocument rptDoc = new ReportDocument(); rptDoc.Load(Server.MapPath("CrystalReportTest.rpt")); rptDoc.SetDataSource(ds.Tables["YourTable"]); crystalReportViewer1.ReportSource = rptDoc; crystalReportViewer1.Refresh();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)