DataBand looses connection to BusinessObject
Posted: Fri Jun 17, 2016 10:52 am
In "Design-Mode" I usually do a report.Dictionary.Clear() and report.Dictionary.BusinessObjects.Clear() to be sure to drop all unused data sources before registering the really used data sources. This works fine for normal data sources, but not for BusinessObjects. After a BusinessObjects.Clear() and then registering the data again and starting the designer, my databands are not assigned to the source anymore, even if name and alias stay the same.
See the code below:
See the code below:
Code: Select all
var stiReport = new StiReport();
stiReport.RegBusinessObject("Foo", new
{
Something = "Anything",
Items = new []
{
new { SomethingElse = "AnythingElese"},
new { SomethingElse = "AnythingElese"},
new { SomethingElse = "AnythingElese"},
}
});
stiReport.Dictionary.SynchronizeBusinessObjects(2);
stiReport.Design();
stiReport.Dictionary.BusinessObjects.Clear();
stiReport.RegBusinessObject("Foo", new
{
Something = "Anything",
Items = new[]
{
new { SomethingElse = "AnythingElese"},
new { SomethingElse = "AnythingElese"},
new { SomethingElse = "AnythingElese"},
}
});
stiReport.Dictionary.SynchronizeBusinessObjects(2);
stiReport.Design();