public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { Class1Grade rpt = new Class1Grade(); rpt.Site = this.Site; return(rpt); }
private void Grade1PrintReport_Load(object sender, EventArgs e) { //select from Grade2FeesRec1 and display in descending order dessy.opencon(); string query = "SELECT * FROM C1Reports ORDER BY id DESC"; SqlDataAdapter da = new SqlDataAdapter(query, dessy.returnCon()); DataSet mydata = new DataSet(); da.Fill(mydata, "C1Reports"); Class1Grade datax = new Class1Grade(); datax.SetDataSource(mydata); crystalReportViewer2.ReportSource = datax; dessy.closeCon(); }