Beispiel #1
0
 public frmBaoCaorpt(Entities.ChiTietBCXuatHangTheoTungKho[] ctBCXH, DateTime truoc, DateTime sau, string path, string hanhDong)
 {
     InitializeComponent(); CongTy();
     GUI.Report.rptXuatHangTheoKho report = new GUI.Report.rptXuatHangTheoKho();
     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 Kho 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);
     }
 }
Beispiel #2
0
 public frmBaoCaorpt(Entities.ChiTietBCXuatHangTheoTungKho[] ctBCXH, DateTime truoc, DateTime sau)
 {
     InitializeComponent(); CongTy();
     GUI.Report.rptXuatHangTheoKho report = new GUI.Report.rptXuatHangTheoKho();
     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 Kho 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();
 }