Business Object sublist properties are not visible
I create the report via code and register Business Object as datasource. Business object contains sub-list (subreport source):
In the code
As result I see in the Data Sources: "Data" and DataFields "Id" and "Name", but the "List" absent.
In the main menu (Data->Choose Report Data...) I could find and select the List data to show, but how to do this via C# code?
public class SubData
{
....
}
public class Data
{
public Int32 Id{get;set;}
public String Name{get;set;}
public List<SubData> List{get;set;}
}
In the code
Data data = new Data();
data.List = new List<SubData>();
List<Data> reportData = new List<Data>();
reportData.Add(data);
....
using (FastReport.Report report = new FastReport.Report())
{
report.RegisterData(reportData, "Data", 5);
report.GetDataSource("Data").Enabled = true;
report.Design(true);
}
As result I see in the Data Sources: "Data" and DataFields "Id" and "Name", but the "List" absent.
In the main menu (Data->Choose Report Data...) I could find and select the List data to show, but how to do this via C# code?