예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReportNHAPDIEM rpt = new CrystalReportNHAPDIEM();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        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;
        }