Business objects with child collections
Posted: Fri Jul 29, 2016 7:50 pm
I'm demoing Stimulsoft, and I have a report generated from a business object that has a child collection, something like:
I want to bind a data band to to the Order.Products collection. The obvious way seems to be creating a "child of business object" data source, but my dialog in the demo editor always has the child option greyed out like this. All of the other guides are for older version of the Stimulsoft designer, so they're no help.
I even tried adding the Product as its own data source and then defining a relation between Order and Products, but the "OK" button is always greyed out no matter what I specify in this dialog (I'm not sure if the relation would do what I want anyway).
I should also note that defining a new data source just for the collection that I have to manually bind via RegBusinessObject is not acceptable. I'm already calling RegBusinessObject on the top-level object which contains the child collection, I should just be able to extract the needed data from that.
Honestly, such a simple thing shouldn't be this complicated, and the video certainly makes it seem easy, so what am I missing?
Code: Select all
public class Order
{
public string OrderNumber {get;set;}
public IEnumerable<Product> Products {get;set;}
}
public class Product
{
public string Name {get;set;}
}
I even tried adding the Product as its own data source and then defining a relation between Order and Products, but the "OK" button is always greyed out no matter what I specify in this dialog (I'm not sure if the relation would do what I want anyway).
I should also note that defining a new data source just for the collection that I have to manually bind via RegBusinessObject is not acceptable. I'm already calling RegBusinessObject on the top-level object which contains the child collection, I should just be able to extract the needed data from that.
Honestly, such a simple thing shouldn't be this complicated, and the video certainly makes it seem easy, so what am I missing?