public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rptPhieuNVLapTrongNamTheoLoai rpt = new rptPhieuNVLapTrongNamTheoLoai(); rpt.Site = this.Site; return(rpt); }
private void btnPreview_Click(object sender, EventArgs e) { BaoCao.rptPhieuNVLapTrongNamTheoLoai obj; obj = new BaoCao.rptPhieuNVLapTrongNamTheoLoai(); string strLenh; strLenh = "EXEC sp_PhieuNvLapTrongNamTheoLoai " + txtManv.Text.Trim() + ", '" + cmbLoai.Text.Substring(0, 1) + "' ," + cmbNam.Text; DataTable MyTable; MyTable = Program.ExecSqlDataTable(strLenh, Program.connstr); obj.SetDataSource(MyTable); obj.SetParameterValue("HOTEN", cmbHoten.Text); obj.SetParameterValue("LOAI", cmbLoai.Text); obj.SetParameterValue("NAM", cmbNam.Text); crptView.ReportSource = obj; }