public void combine_parent_datasourcepath_with_band_memberpath() { var factory = new ReportFactory(); var designContext = TestHelper.CreateDesignerContext(); // Parent Report var report = factory.GetNewReport(); report.Name = "parentreport"; var definition = TestHelper.NorthwindDataSource; definition.DataSourceRelationPath = "[0]"; report.ChangeDesignTimeDatasource(definition, designContext); // Subreport Container var detailReportBand = new DetailReportBand(); detailReportBand.DataMember = "OrderDetails"; report.Bands.Add(detailReportBand); var path = detailReportBand.GetFullDataMemberPath(); Assert.AreEqual("[0].OrderDetails", path); }
public void should_traverse_when_changing_datasource() { var factory = new ReportFactory(); var designContext = TestHelper.CreateDesignerContext(); var report = factory.GetNewReport(); var definition = TestHelper.NorthwindDataSource; definition.DataSourceRelationPath = "Order_Details"; report.ChangeDesignTimeDatasource(definition, designContext); var datasource = report.DataSource; Assert.IsTrue(datasource is IEnumerable<Order_Detail>); }