Master/Detail on deep business object graph
Posted: Fri Feb 01, 2008 11:06 am
Hello,
I have some kinda tricky business object reporting problem here. Consider these classes:
Now let's say, I want to build a report on a list of ProductTurnovers:
This gives me three data sources: "MyReport", "MyReport_Product" and "MyReport_Product_EnhancedArticleNumber".
What I would like to do now, is have a Master and a Detail data band:
So this should basically be a list of product turnovers, listing all EAN codes of a product after each line.
Is there a way to do this, with only two data bands? If I setup a master and detail data band for "MyReport" and "MyReport_Product_EnhancedArticleNumber", then the resulting report is empty. If I use three data bands ("MyReport" -> "MyReport_Product" -> "MyReport_Product_EnhancedArticleNumber") then it works.
I have some kinda tricky business object reporting problem here. Consider these classes:
Code: Select all
public class ProductTurnover
{
Product Product { get; }
decimal Amount { get; }
decimal Quantity { get; }
}
public class Product
{
string Name { get; }
decimal Price { get; }
IList EnhancedArticleNumbers { get; }
}
Code: Select all
List data = new List();
...
report.RegData("MyReport", data);
What I would like to do now, is have a Master and a Detail data band:
Code: Select all
Master: MyReport.Product.Number, MyReport.Product.Name, MyReport.Quantity, MyReport.Amount
Detail: MyReport_Product_EnhancedArticleNumber
Is there a way to do this, with only two data bands? If I setup a master and detail data band for "MyReport" and "MyReport_Product_EnhancedArticleNumber", then the resulting report is empty. If I use three data bands ("MyReport" -> "MyReport_Product" -> "MyReport_Product_EnhancedArticleNumber") then it works.