BusinessObject source doesn't populate members of C# anonymous type
Posted: Fri Sep 02, 2011 8:17 pm
For example, in the below code, Name and Company of 'Department' are not displayed in dictionary.
But when anonymous type is used at collection, it works fines(Looks at the Phones).
It happens at both winform and web.
Please refer to the below image.
Thanks
But when anonymous type is used at collection, it works fines(Looks at the Phones).
It happens at both winform and web.
Please refer to the below image.
Thanks
Code: Select all
var data = from EmployeeITypedList emp in CreateBusinessObjectsITypedList.GetEmployees()
select (
new
{
Name = emp.EmployeeName,
Department = new { Name = emp.Department.DepartmentName, Company = emp.Department.Company.CompanyName},
Phones = from Phone phone in emp.Phones
select (new { Area = "xxx", Number = phone.Number })
}
);
report.RegBusinessObject("employee", data);