public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ThongTinRP rpt = new ThongTinRP(); rpt.Site = this.Site; return(rpt); }
private void Report_Load(object sender, EventArgs e) { ReportDocument objrep = new ThongTinRP(); ConnectionInfo mycon = new ConnectionInfo(); TableLogOnInfo myinfo = new TableLogOnInfo(); mycon.IntegratedSecurity = true; mycon.ServerName = "DESKTOP-2IAIEK9"; mycon.DatabaseName = "QLGT"; myinfo.ConnectionInfo = mycon; objrep.Database.Tables[0].ApplyLogOnInfo(myinfo); rv.ReportSource = objrep; rv.Refresh(); }