public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { AllStudents rpt = new AllStudents(); rpt.Site = this.Site; return(rpt); }
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(); }