I'm new to RDLC report and I have a basic requirement which I think it should be supported. But I can't find the specific solution. So Please help me. Thank you:)
The datasource of my report is a object like this:
class Order {
public string id {get; set;}
public int userid {get; set;}
public Address address {get; set;}
public List<Package> packages {get; set;}
}
class Address {
// Fields...
}
class Package {
public string pNumber {get; set;}
public string state {get; set;}
public List<Item> items {get; set;}
}
class Item {
public string itemName{get; set;}
// other fields...
}
And I would like to make a report like this:
+----------+-----------+----------+----------+
| OrderId | [orderId] | UserId | [userId] |
+----------+-----------+----------+----------+
| Address | [address line 1] |
+ +---------------------------------+
| | [address line 2] |
+----------+---------------------------------+
| Packages |
+--------------------------------------------+
| package1 | pNumber | [pnumber] |
+ +-----------+---------------------+
| | State | [state] |
+ +-----------+---------------------+
| | Items | ItemName | ItemSize |
+ + +----------+----------+
| | | item1 | 111 |
+ + +----------+----------+
| | | item2 | 222 |
+----------+-----------+----------+----------+
| package2 | pNumber | [pnumber] |
+ +-----------+---------------------+
| | State | [state] |
+ +-----------+---------------------+
| | Items | ItemName | ItemSize |
+ + +----------+----------+
| | | item3 | 111 |
+ + +----------+----------+
| | | item4 | 222 |
+----------+-----------+----------+----------+
So how should I bind the dataset to the report? I use the report builder and can only bind the object non-list fields to it or just the list field. Any idea/suggestion/example are welcome. Thank you.