コード例 #1
0
        public frmStockGroup()
        {
            InitializeComponent();
            this.DataContext = data;

            RptStock.SetDisplayMode(DisplayMode.PrintLayout);
            onClientEvents();

            cmbUnder.ItemsSource       = BLL.StockGroup.toList;
            cmbUnder.DisplayMemberPath = "StockGroupName";
            cmbUnder.SelectedValuePath = "Id";
        }
コード例 #2
0
        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)
            {
            }
        }