public frmStaff() { InitializeComponent(); this.DataContext = data; RptStaff.SetDisplayMode(DisplayMode.PrintLayout); onClientEvents(); }
private void LoadReport() { try { RptStaff.Reset(); ReportDataSource data = new ReportDataSource("Staff", BLL.Staff.toList.Where(x => Staff_Filter(x)).ToList()); ReportDataSource data1 = new ReportDataSource("CompanyDetail", BLL.CompanyDetail.toList.Where(x => x.Id == BLL.UserAccount.Company.Id).ToList()); RptStaff.LocalReport.DataSources.Add(data); RptStaff.LocalReport.DataSources.Add(data1); RptStaff.LocalReport.ReportPath = @"rpt\master\rptStaff.rdlc"; RptStaff.RefreshReport(); } catch (Exception ex) { } }