public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CrystalReport_tkThucPham rpt = new CrystalReport_tkThucPham(); rpt.Site = this.Site; return(rpt); }
private void crystalReportViewer1_ReportRefresh(object source, CrystalDecisions.Windows.Forms.ViewerEventArgs e) { DTO.fThongKeThucPhamDTO fthongkethucpham = new DTO.fThongKeThucPhamDTO(); DataTable table = fthongkethucpham.LayDS_THUCPHAM(); CrystalReport_tkThucPham report = new CrystalReport_tkThucPham(); report.SetDataSource(table); crystalReportViewer1.ReportSource = report; }
private void frmThongKeThucPham_Shown(object sender, EventArgs e) { DTO.fThongKeThucPhamDTO fthongkethucpham = new DTO.fThongKeThucPhamDTO(); DataTable table = fthongkethucpham.LayDS_THUCPHAM(); CrystalReport_tkThucPham report = new CrystalReport_tkThucPham(); report.SetDataSource(table); crystalReportViewer1.ReportSource = report; }
private void fthongkeThucPham_Load(object sender, EventArgs e) { CrystalReport_tkThucPham report = new CrystalReport_tkThucPham(); CrystalDecisions.Shared.TableLogOnInfo tlicurrent = new CrystalDecisions.Shared.TableLogOnInfo(); foreach (CrystalDecisions.CrystalReports.Engine.Table tbcurrent in report.Database.Tables) { tlicurrent = tbcurrent.LogOnInfo; tlicurrent.ConnectionInfo.ServerName = Environment.MachineName; tbcurrent.ApplyLogOnInfo(tlicurrent); } }