public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rpDocGia rpt = new rpDocGia(); rpt.Site = this.Site; return(rpt); }
private void frmDSDG_Load(object sender, EventArgs e) { string query = "SELECT MaDG,TenDG,NgaySinh,GioiTinh,DiaChi,SDT FROM DOCGIA"; DataTable tblDSDG = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(query, XLBang.cnnStr); try { da.Fill(tblDSDG); rpDocGia rpt = new rpDocGia(); rpt.SetDataSource(tblDSDG); rptvDSDG.ReportSource = rpt; } catch (SqlException ex) { MessageBox.Show(ex.ToString()); } }