private void populateReportData() { List <AddTeacher> all = new List <AddTeacher>(); using (FinalEntities1 dc = new FinalEntities1()) { all = dc.AddTeachers.ToList(); } ReportViewer1.LocalReport.DataSources.Clear(); ReportDataSource rdl = new ReportDataSource("DataSet3", all); ReportViewer1.LocalReport.DataSources.Add(rdl); ReportViewer1.LocalReport.Refresh(); }
private void populateReportData() { List <ManageAttendance> all = new List <ManageAttendance>(); using (FinalEntities1 dc = new FinalEntities1()) { all = dc.ManageAttendances.ToList(); } ReportViewer1.LocalReport.DataSources.Clear(); ReportDataSource rdl = new ReportDataSource("DataSet2", all); ReportViewer1.LocalReport.DataSources.Add(rdl); ReportViewer1.LocalReport.Refresh(); }