This question is locked. New answers and comments are not allowed.
I'm displaying a List of Schemes on a grid and two of the columns are from the following join tables.
and the following is the SchemeSystem entity
What do I need to do to display the Division and Town names in my report and Excel?
- SchemeTown -- stores towns associated with the scheme (scheme_id, town_id)
- SchemeDivision - stores divisions associated with the scheme (scheme_id, division_id)
on the grid, among other information, I'm successfully displaying name of the town and division for each scheme.
Problem comes when I export this data to an excel sheet or of I want to display this data in a report, the town and division name are not exported, I've attached an excel sheet to show how they are being outputted.
The export to excel and report display get their data from the same data source as the grid mentioned above. The following code block shows how this data is retrieved from the database.
public
List<SchemeSystem> GetAllSchemeSystems()
{
return
(from schemeSystem
in
DataHandler.Extent<SchemeSystem>() where schemeSystem.Planned ==
false
& schemeSystem.Id != Guid.Empty select schemeSystem).ToList<SchemeSystem>();
}
and the following is the SchemeSystem entity
public
partial
class
SchemeSystem
{
//The 'no-args' constructor required by OpenAccess.
public
SchemeSystem()
{
}
[Telerik.OpenAccess.FieldAlias(
"id"
)]
public
Guid Id
{
get
{
return
id; }
private
set
{ id = value; }
}
[Telerik.OpenAccess.FieldAlias(
"name"
)]
public
string
Name
{
get
{
return
name; }
set
{
this
.name = value; }
}
[Telerik.OpenAccess.FieldAlias(
"wsp"
)]
public
Wsp Wsp
{
get
{
return
wsp; }
set
{
this
.wsp = value; }
}
[Telerik.OpenAccess.FieldAlias(
"planned"
)]
public
bool
Planned
{
get
{
return
planned; }
set
{
this
.planned = value; }
}
[Telerik.OpenAccess.FieldAlias(
"schemeSystemData"
)]
public
IList<SchemeSystemData> SchemeSystemDatas
{
get
{
return
schemeSystemData; }
}
[Telerik.OpenAccess.FieldAlias(
"schemeTowns"
)]
public
IList<Town> schemeTown
{
get
{
return
schemeTowns; }
}
[Telerik.OpenAccess.FieldAlias(
"schemeDivisions"
)]
public
IList<Division> schemeDivision
{
get
{
return
schemeDivisions; }
}
}
What do I need to do to display the Division and Town names in my report and Excel?