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

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            using (var Dbconnection = new MCDEntities())
            {
                BindingSource bs = new BindingSource();

                bs.DataSource = (from a in Dbconnection.Students
                                 select a).ToList <Student>();
                StudentReport rpt = new StudentReport();
                rpt.SetDataSource(bs);
                crystalReportViewer1.ReportSource = rpt;
                crystalReportViewer1.RefreshReport();
            };
        }