public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CrystalReportStudent rpt = new CrystalReportStudent(); rpt.Site = this.Site; return(rpt); }
private void genReportSt_Click(object sender, EventArgs e) { DataSet2St ds = new DataSet2St(); SqlCommand cmd = con.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "select * from student_info "; cmd.ExecuteNonQuery(); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds.DataTable2); CrystalReportStudent myreport = new CrystalReportStudent(); myreport.SetDataSource(ds); crystalReportViewerSt.ReportSource = myreport; }