public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { Rpt_Nhanviennghiviectrongthang rpt = new Rpt_Nhanviennghiviectrongthang(); rpt.Site = this.Site; return(rpt); }
private void loadFull() { try { THANG = cmb_thang.Text; NAM = cmb_nam.Text; Report.Rpt_Nhanviennghiviectrongthang Rp = new Rpt_Nhanviennghiviectrongthang(); //sua lai proc DataTable ds = BUS.BUS_Nhanvien.rpt_nvNghiviecThang(); Rp.SetDataSource(ds); Rp.SetParameterValue("nam", NAM); if (cmb_thang.Text == "----Chọn tháng----") { THANG = "0"; Rp.SetParameterValue("thang_nam", "NĂM " + NAM + " "); Rp.SetParameterValue("dau", ""); } else { Rp.SetParameterValue("thang_nam", "THÁNG " + THANG + " - " + NAM + " "); Rp.SetParameterValue("dau", " - "); } Rp.SetParameterValue("thang", Int32.Parse(THANG)); crystalReportViewer1.ReportSource = Rp; } catch { MessageBox.Show("Kết nối với máy chủ thất bại", "Chú ý", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }