From: Giorgio Parmeggiani on
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
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
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