From: Giorgio Parmeggiani on 18 Jun 2010 03:40 Hi, I've a report with a object data source. I've a entity (A) with a property (b) that return an object (C) with other property (D). how can i put a property D in my report?" Thank in advance Giorgio
From: "Charles Wang [MSFT]" on 21 Jun 2010 23:34 Hi Giorgio, To view the property D in your report data source, you need to create your bussiness objects like this: 1. Class C class BusinessObjectC { private string d; public BusinessObjectC(string strD) { d = strD; } public string D { get { return d; } } } 2. Class A class BusinessObjectA { private List<BusinessObjectC> b; public BusinessObjectA() { b = new List<BusinessObjectC>(); } public List<BusinessObjectC> B { get { return b; } } public void AddC(BusinessObjectC c) { b.Add(c); } } In your class A, you need to use a List template to wrap your entity C and return a list of the business object C. Then in the returned data source you can see the column D under the table B when you add the business object A as the data source. Best regards, Charles Wang
From: "Charles Wang [MSFT]" on 21 Jun 2010 23:38 There is a same thread in this community and I have replied in that thread. Here is the response: ====================== To view the property D in your report data source, you need to create your bussiness objects like this: 1. Class C class BusinessObjectC { private string d; public BusinessObjectC(string strD) { d = strD; } public string D { get { return d; } } } 2. Class A class BusinessObjectA { private List<BusinessObjectC> b; public BusinessObjectA() { b = new List<BusinessObjectC>(); } public List<BusinessObjectC> B { get { return b; } } public void AddC(BusinessObjectC c) { b.Add(c); } } In your class A, you need to use a List template to wrap your entity C and return a list of the business object C. Then in the returned data source you can see the column D under the table B when you add the business object A as the data source. Best regards, Charles Wang
|
Pages: 1 Prev: Pivot in a Join Next: RDLC 2008 Error in print layout mode |