public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CrystalReportQuery rpt = new CrystalReportQuery(); rpt.Site = this.Site; return(rpt); }
private void FormListStudentWithQuery_Load(object sender, EventArgs e) { using (ModelTD db = new ModelTD()) { CrystalReportQuery crystalReportQuery = new CrystalReportQuery(); var query = from s in db.Students.Include("Group") select new { s.LastName, Name = s.Group.Name, s.GroupId }; crystalReportQuery.SetDataSource(query); crystalReportViewer1.ReportSource = crystalReportQuery; } }