I am new with crystal reports and have one problem. I need subreport or grouping in table, but problem is that I have two clases Group and Foo, Group has List and I need grouping via Group.Name and display data from Foo.
For example:
public class Group
{
public string Name{get;set;}
public List<Group> Children{get;set}
public Group ParentGroup{get;set;}
public List<Foo> Items{get;set;}
}
public class Foo
{
public string Name{get;set;}
public string Number{get;set;}
public double Price{get;set;}
public double Quantity{get;set;}
}
and I want get report grouped by Group.Name and see Foo detail
For example:
Group1
|Name | Number | Quantity | Price | TotalPrice |
|Pen | 01 | 3 | 15 | 45|
|Eraser | 14 | 1 | 20 | 20|
How is the best way to do it? Data is not in database, its only as object in c#. But real problem is reference Group.Items
Thanks for help. Jakub
Workaround: Pull out two data tables from database in a single SP.