public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rptBCChiTietHangHoa rpt = new rptBCChiTietHangHoa(); rpt.Site = this.Site; return(rpt); }
public frmBaoCaorpt(IEnumerable<rptBCChiTietHangHoa> dsList, IDictionary<string, object> dicInput, string path, string hanhDong) { try { InitializeComponent(); CongTy(); Report.rptBCChiTietHangHoa report = new Report.rptBCChiTietHangHoa(); report.SetDataSource(dsList); crvReport.ReportSource = report; report.SetParameterValue("TenCongTy", CT.TenCongTy); report.SetParameterValue("DiaChiCongTy", CT.DiaChi); report.SetParameterValue("DienThoai", CT.SoDienThoai); report.SetParameterValue("Web", CT.Website); report.SetParameterValue("Email", CT.Email); report.SetParameterValue("FaxCongTy", CT.Fax); report.SetParameterValue("TenBaoCao", "Báo Cáo Chi Tiết Hàng Hóa"); report.SetParameterValue("NgayTao", new Common.Utilities().XuLy(2, DateServer.Date().ToShortDateString())); report.SetParameterValue("MaNhanVien", Common.Utilities.User.TenNhanVien); switch (hanhDong) { case "Excel": new Report.ExportCrystalReport().Export(report, path, Report.ExportCrystalReport.TypeBC.Excel); break; case "Word": new Report.ExportCrystalReport().Export(report, path, Report.ExportCrystalReport.TypeBC.WordForWindows); break; case "PDF": new Report.ExportCrystalReport().Export(report, path, Report.ExportCrystalReport.TypeBC.PortableDocFormat); break; } } catch { } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rptBCChiTietHangHoa rpt = new rptBCChiTietHangHoa(); rpt.Site = this.Site; return rpt; }