示例#1
0
        protected override void FillDataSources(XtraReport report, string reportName, bool isDesignActive)
        {
            var dataSet = (Northwind)report.GetDataSourceByName("Northwind");

            using (var adapter = new ProductsTableAdapter())
                adapter.Fill(dataSet.Products);
        }
示例#2
0
        protected override void FillDataSources(XtraReport report, string reportName, bool isDesignActive)
        {
            var bindingSource = (BindingSource)report.GetDataSourceByName("Products");

            var session = ConnectionHelper.CreateSession("Northwind");

            bindingSource.DataSource = new XPCollection <Products>(session);
        }
示例#3
0
        // Populate your datasources for an editing session using the following method.
        protected override void FillDataSources(XtraReport report, string reportName, bool isDesignActive)
        {
            DataSet1 dataSet = (DataSet1)report.GetDataSourceByName("XtraReport1Data");

            using (var categoriesTableAdapter = new CategoriesTableAdapter())
                using (var productsTableAdapter = new ProductsTableAdapter()) {
                    categoriesTableAdapter.Fill(dataSet.Categories);
                    productsTableAdapter.Fill(dataSet.Products);
                }
        }
示例#4
0
        protected override void FillDataSources(XtraReport report, string reportName, bool isDesignActive)
        {
            var bindingSource = (BindingSource)report.GetDataSourceByName("Products");

            bindingSource.DataSource = new NorthwindEntities().Products;
        }