I create a report with the following code:
Code: Select all
StiReport report = new StiReport();
Datasource d = new Datasource();
List list = new List();
Team t1 = new Team("Team 1");
t1.list.Add(new Child("c1a_firstname", "b1a_lastname"));
t1.list.Add(new Child("c1b_firstname", "b1b_lastname"));
Team t2 = new Team("Team 2");
t2.list.Add(new Child("c2a_firstname", "b2a_lastname"));
t2.list.Add(new Child("c2b_firstname", "b2b_lastname"));
list.Add(t1);
list.Add(t2);
d.list = list;
report.RegData("Data",d);
report.Dictionary.Synchronize();
report.Design();
Code: Select all
public class Datasource
{
public List list = new List();
}
public class Team
{
public string Name { set; get; }
public List list = new List();
public Team(string name)
{
Name = name;
}
}
public class Child
{
public Child(string firstnames, string lastname)
{
Firstnames = firstnames;
Lastname = lastname;
}
public string Firstnames { set; get; }
public string Lastname { set; get; }
}
The problem is that I only show a field name "Data". I want to see the entire tree stucture of the datasource in the dictionary of the designer.
What can I do to make this possible?
Thank you.