public frmStockGroup() { InitializeComponent(); this.DataContext = data; RptStock.SetDisplayMode(DisplayMode.PrintLayout); onClientEvents(); cmbUnder.ItemsSource = BLL.StockGroup.toList; cmbUnder.DisplayMemberPath = "StockGroupName"; cmbUnder.SelectedValuePath = "Id"; }
private void LoadReport() { try { RptStock.Reset(); ReportDataSource data = new ReportDataSource("StockGroup", BLL.StockGroup.toList.Where(x => Stock_Filter(x)).ToList()); ReportDataSource data1 = new ReportDataSource("CompanyDetail", BLL.CompanyDetail.toList.Where(x => x.Id == BLL.UserAccount.Company.Id).ToList()); RptStock.LocalReport.DataSources.Add(data); RptStock.LocalReport.DataSources.Add(data1); RptStock.LocalReport.ReportPath = @"rpt\master\rptStock.rdlc"; RptStock.RefreshReport(); } catch (Exception ex) { } }