public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { Report_DT rpt = new Report_DT(); rpt.Site = this.Site; return(rpt); }
private void frmReport_DT_Load(object sender, EventArgs e) { Report_DT objRpt = new Report_DT(); objRpt.SetDataSource(rp.report_DT().Tables[1]); crystalReportViewer_DT.ReportSource = objRpt; crystalReportViewer_DT.Refresh(); }
private void frmReport_DT_Load(object sender, EventArgs e) { SqlConnection connect; connect = new SqlConnection(@"server=.\SQLEXPRESS; Database=QuanLiCaPhe;integrated security=true"); connect.Open(); SqlDataAdapter da = new SqlDataAdapter(); string query = "SELECT * FROM tblDoanhThu"; SqlDataAdapter dscm = new SqlDataAdapter(query, connect); DSDoanhThu ds = new DSDoanhThu(); dscm.Fill(ds, "tblDoanhThu"); connect.Close(); Report_DT objRpt = new Report_DT(); objRpt.SetDataSource(ds.Tables[1]); crystalReportViewer_DT.ReportSource = objRpt; crystalReportViewer_DT.Refresh(); }