示例#1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            AllStudents rpt = new AllStudents();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        private void CrystalReportViewer1_Load(object sender, EventArgs e)
        {
            AllStudents    cr      = new AllStudents();
            string         sql     = "SELECT * FROM Etudiant ";
            DataSet        ds      = new DataSet();
            SqlDataAdapter adapter = new SqlDataAdapter(sql, connectionString);

            adapter.Fill(ds, "Etudiant");
            DataTable dt = ds.Tables["Etudiant"];

            cr.SetDataSource(ds.Tables["Etudiant"]);
            crystalReportViewer1.ReportSource = cr;
            crystalReportViewer1.Refresh();
        }