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

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
파일: Form1.cs 프로젝트: Lirababe/Impendulo
        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();
            };
        }