public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CrystalReportNHAPDIEM rpt = new CrystalReportNHAPDIEM(); rpt.Site = this.Site; return(rpt); }
private void crystalReportViewer1_Load(object sender, EventArgs e) { DataSetdiem.nhapdiemDataTable nd = new DataSetdiem.nhapdiemDataTable(); StreamReader sr = new StreamReader("luudiem.txt"); string dong = sr.ReadLine(); while (dong != null) { string[] arr = dong.Split('|'); nd.Rows.Add(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]); dong = sr.ReadLine(); } sr.Close(); CrystalReportNHAPDIEM crnd = new CrystalReportNHAPDIEM(); crnd.SetDataSource((DataTable)nd); crystalReportViewer1.ReportSource = crnd; }