예제 #1
0
 public frmBaoCaorpt(Entities.ChiTietBCXuatHangTheoNhomHang[] ctBCXH, DateTime truoc, DateTime sau)
 {
     InitializeComponent();
     CongTy();
     GUI.Report.rptXuatHangTheoNhomHang report = new GUI.Report.rptXuatHangTheoNhomHang();
     report.SetDataSource(ctBCXH);
     crvReport.ReportSource = report;
     report.SetParameterValue("TenCongTy", CT.TenCongTy);
     report.SetParameterValue("DiaChiCongTy", CT.DiaChi);
     report.SetParameterValue("DienThoai", CT.SoDienThoai);
     report.SetParameterValue("FaxCongTy", CT.Fax);
     report.SetParameterValue("Web", CT.Website);
     report.SetParameterValue("TenBaoCao", "Báo Cáo Xuất Hàng Theo Nhóm Hàng");
     report.SetParameterValue("NgayTao", xulyNgay(DateServer.Date()));
     report.SetParameterValue("MaNhanVien", Common.Utilities.User.TenNhanVien);
     report.SetParameterValue("Email", CT.Email);
     report.SetParameterValue("tuNgay", xulyNgay(truoc));
     report.SetParameterValue("DenNgay", xulyNgay(sau));
     crvReport.Show();
 }
예제 #2
0
 public frmBaoCaorpt(Entities.ChiTietBCXuatHangTheoNhomHang[] ctBCXH, DateTime truoc, DateTime sau, string path, string hanhDong)
 {
     InitializeComponent();
     CongTy();
     GUI.Report.rptXuatHangTheoNhomHang report = new GUI.Report.rptXuatHangTheoNhomHang();
     report.SetDataSource(ctBCXH);
     crvReport.ReportSource = report;
     report.SetParameterValue("TenCongTy", CT.TenCongTy);
     report.SetParameterValue("DiaChiCongTy", CT.DiaChi);
     report.SetParameterValue("DienThoai", CT.SoDienThoai);
     report.SetParameterValue("FaxCongTy", CT.Fax);
     report.SetParameterValue("Web", CT.Website);
     report.SetParameterValue("TenBaoCao", "Báo Cáo Xuất Hàng Theo Nhóm Hàng");
     report.SetParameterValue("NgayTao", xulyNgay(DateServer.Date()));
     report.SetParameterValue("MaNhanVien", Common.Utilities.User.TenNhanVien);
     report.SetParameterValue("Email", CT.Email);
     report.SetParameterValue("tuNgay", xulyNgay(truoc));
     report.SetParameterValue("DenNgay", xulyNgay(sau));
     if (hanhDong == "Excel")
     {
         new GUI.Report.ExportCrystalReport().Export(report, path, Report.ExportCrystalReport.TypeBC.Excel);
     }
     else if (hanhDong == "Word")
     {
         new GUI.Report.ExportCrystalReport().Export(report, path, Report.ExportCrystalReport.TypeBC.WordForWindows);
     }
     else if (hanhDong == "PDF")
     {
         new GUI.Report.ExportCrystalReport().Export(report, path, Report.ExportCrystalReport.TypeBC.PortableDocFormat);
     }
 }