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

            rpt.Site = this.Site;
            return(rpt);
        }
 private void AllStudentReports_Load(object sender, EventArgs e)
 {
     using (con = new SqlConnection(ConStr))
     {
         using (adapter = new SqlDataAdapter("select * from Student", con))
         {
             dt = new DataTable();
             adapter.Fill(dt);
             AllStudentCrystalReport asr = new AllStudentCrystalReport();
             asr.SetDataSource(dt);
             crystalReportViewer1.ReportSource = asr;
         }
     }
 }