public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rpDSNV rpt = new rpDSNV(); rpt.Site = this.Site; return(rpt); }
private void frmDSNV_Load(object sender, EventArgs e) { string query = "SELECT MaNV, HoTenNV, NgaySinh, GioiTinh, DiaChi, SDT, ChucVu FROM NHANVIEN"; DataTable tblDSNV = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(query, XLBang.cnnStr); try { da.Fill(tblDSNV); rpDSNV rpt = new rpDSNV(); rpt.SetDataSource(tblDSNV); rptvDSNV.ReportSource = rpt; } catch (SqlException ex) { MessageBox.Show(ex.ToString()); } }