private void BuildProductsReport()
        {
            // request data from OData service
            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; // force Tls12
            var service = new DemoODataService.DemoService(ODataUri);
            // select all categories and products of each category
            var categories = service.Categories.Expand(c => c.Products).Execute();
            var products   = (
                from c in categories
                from p in c.Products
                select new
            {
                CategoryID = c.ID,
                CategoryName = c.Name,
                ID = p.ID,
                Name = p.Name,
                Description = p.Description,
                ReleaseDate = p.ReleaseDate,
                DiscontinuedDate = p.DiscontinuedDate,
                Rating = p.Rating,
                Price = p.Price,
            }).ToList();

            // load report definition from resources
            Assembly asm = Assembly.GetExecutingAssembly();

            using (Stream stream = asm.GetManifestResourceStream("Binding.Resources.Reports.flxr"))
                _report.Load(stream, "Products");

            // assign dataset to the report
            _report.DataSource.Recordset = products;
        }
        private void BuildCategoriesReport()
        {
            // request data from OData service
            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; // force Tls12
            var service = new DemoODataService.DemoService(ODataUri);
            // select all categrues
            var categories = service.Categories.Execute().ToList();

            // load report definition from resources
            Assembly asm = Assembly.GetExecutingAssembly();

            using (Stream stream = asm.GetManifestResourceStream("Binding.Resources.Reports.flxr"))
                _report.Load(stream, "Categories");

            // assign dataset to the report
            _report.DataSource.Recordset = categories;
        }