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