public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rpttonghop rpt = new rpttonghop(); rpt.Site = this.Site; return(rpt); }
private void frmrpttonghop_Load(object sender, EventArgs e) { rpttonghop rpt = new rpttonghop(); //rpt.SetDataSource(dts.Tables[0]); //CrystalDecisions.Shared.TableLogOnInfo dd=rpt.Database.Tables[0].LogOnInfo; //dd.ConnectionInfo.DatabaseName = Path.Combine(Directory.GetCurrentDirectory(), "bangdiem.mdb"); //dd.TableName = "tblrptbailam"; //rpt.Database.Tables[0].ApplyLogOnInfo(dd); //rpt.VerifyDatabase(); //Data tbl=rpt.Database.Tables["tblrptbailam"].LogOnInfo(); rpt.Refresh(); cv.ReportSource = rpt; }