I couldn't find any solution regarding this matter. If anyone use Telerik and have any idea about this please post. :)
Currently I have an ojbect:
Absence
-> List<Available> Available
I was successfully pass the List object to the main table and list out the Absence object. However when i try to do something like the ff, I have a mental block and I could not find anyway either on google or on their documentation
------------------------------------------------------------
| ABSENCE |
------------------------------------------------------------
| Field1 | Field2 |
| |
| ----------------------------------------------------- |
| | Available | |
| ----------------------------------------------------- |
| | Available Field1 | Available Field2 | |
| ----------------------------------------------------- |
| |
|----------------------------------------------------------|
|----------------------------------------------------------|
| Field1 | Field2 |
| |
| ----------------------------------------------------- |
| | Available | |
| ----------------------------------------------------- |
| | Available Field1 | Available Field2 | |
| ----------------------------------------------------- |
| |
------------------------------------------------------------
I cannot find anyway to bind or change the datasource of the subTable to the corresponding sub object How can I archive this kind of result?
Thank you
You'll want to use SubReports for this. You can read about them in Telerik's documenation or even read this help page that is specifically about master-detail reports which is like what you are doing.
Basically, you'll create two reports. The Master report will display all the Absence objects. As part of the 'detail' section of that report, you'll place a SubReport. The SubReport will show the second report which will list all the Available objects. Then you can pass a parameter from the master report to the sub report and use a filter so you only see the Availables that correspond to the passed in Absence.
Then remember that the outer report's Data Source should be all the Absences and the inner report's Data Source should be all the Availables.
I have had same problem a while ago. I figured out that Telerik Reporting has some kind of bug with nested tables. If I put Table2 (child) as cell content of Table1 (parent) and try to bind data sources (via bindings or in code, no matter) than my child Table2 will always show the same item in all rows. I try to ask in official Telerik forum about that but they just tell me to use SubReport (which, by the way, did not resolve my problem). So I was forced to use List (Telerik Reporting control) as parent content holder. And as you understand it was hard to implement such markup as in Table control.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With