private void crystalReportViewer1_ReportRefresh(object source, CrystalDecisions.Windows.Forms.ViewerEventArgs e) { DTO.fThongKeLoaiMonAnDTO fthongkeloaimonan = new DTO.fThongKeLoaiMonAnDTO(); DataTable table = fthongkeloaimonan.LayDS_LOAIMA(); CrystalReport_tkLoaiMonAn report = new CrystalReport_tkLoaiMonAn(); report.SetDataSource(table); crystalReportViewer1.ReportSource = report; }
private void frmThongKeLoaiMonAn_Shown(object sender, EventArgs e) { try { DTO.fThongKeLoaiMonAnDTO fthongkeloaimonan = new DTO.fThongKeLoaiMonAnDTO(); DataTable table = fthongkeloaimonan.LayDS_LOAIMA(); CrystalReport_tkLoaiMonAn report = new CrystalReport_tkLoaiMonAn(); report.SetDataSource(table); crystalReportViewer1.ReportSource = report; } catch (Exception) { } }