public InterventionsView() { InitializeComponent(); this.CustomizeInterventionsView(); orderService = new OrderService(); userService = new UserService(); atmService = new AtmService(); ///Init Blank report /// /// this.rVReports.LocalReport.DataSources.Clear(); rVReports.Reset(); rVReports.LocalReport.ReportPath = "Reports/BlankReport.rdlc"; var allAtmsDataSource = new AtmService(); var allAtms = allAtmsDataSource.GetAllAtmsList(); Microsoft.Reporting.WinForms.ReportDataSource rprtDTSource = new Microsoft.Reporting.WinForms.ReportDataSource(); rprtDTSource.Name = "DataSet1"; rprtDTSource.Value = this.AtmModelBindingSource; this.rVReports.LocalReport.DataSources.Add(rprtDTSource); this.AtmModelBindingSource.DataSource = allAtms; this.rVReports.RefreshReport(); }
private void BtnAllAtmsReport_Click(object sender, EventArgs e) { this.rVReports.LocalReport.DataSources.Clear(); rVReports.Reset(); rVReports.LocalReport.ReportPath = "Reports/AllAtmsReport.rdlc"; var allAtmsDataSource = new AtmService(); var allAtms = allAtmsDataSource.GetAllAtmsList(); Microsoft.Reporting.WinForms.ReportDataSource rprtDTSource = new Microsoft.Reporting.WinForms.ReportDataSource(); rprtDTSource.Name = "DataSet1"; rprtDTSource.Value = this.AtmModelBindingSource; this.rVReports.LocalReport.DataSources.Add(rprtDTSource); this.AtmModelBindingSource.DataSource = allAtms; this.rVReports.RefreshReport(); }