This is a migrated thread and some comments may be shown as answers.

Nested Sub-table with Objects in Telerik Rerporting?

1 Answer 511 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ta Duc
Top achievements
Rank 1
Ta Duc asked on 15 Oct 2011, 01:11 PM
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

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 19 Oct 2011, 04:14 PM
Hi Ta Duc,

The simplest approach to specify the data source for the nested Table is to use its Bindings collection property to define a binding expression for the DataSource property like the following one:

=Fields.Available

The above binding expression simply binds the DataSource property of the detail Table to the Available data field from the current record of the master Table.

To demonstrate the above approach I have attached a small sample report. In the designer select the detailTable from the drop-down list in the property grid and click on the ellipsis button for the Bindings property. There is a single binding expression defined for the DataSource property which binds it to the detail records of the current master record.

Hope this helps.

Best wishes,
Ivan
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

Tags
General Discussions
Asked by
Ta Duc
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or