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

Parent/Child report

1 Answer 498 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 08 Nov 2016, 12:09 PM

Hi,

Having example data described in parent_child_01.png (attached to this thread). I'd like to display this data ina parent/child way. Check parent_child_02.png, there are a subset of fields from the example data grouped on fields ProjektNr and Aktivitet. When clicking the + sign I'd like to expand the rest of the data belonging to current ProjektNr and Aktivitet like in parent_child_03.png.

How do I accomplish this. Been tryin around without success. Should I use a table, a crosstab, subreports??

Best regards,

Thomas

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 09 Nov 2016, 05:31 PM
Hi Thomas,

Flatten data. Then you can use the Band Report Wizard and bind the data directly to the report's DataSource property. On designing the report add a grouping by field, this will add GroupHeader|FooterSection in which you can place the repeating data (fields). The Detail section will repeat for each record in the group.

Then you can set the Detail section's visible property to false, and add a ToggleVisibilityAction to an item in the GroupHeaderSection -  the target will be the Detail section.


If data cannot be flatten, please check How to Databind to Collection Properties and Use DataObject as a datasource for nested data items (Table, List, Crosstab, Graph). The idea is that you can add a Table item displaying the sub set of data, even if it is not a collection property of the main object. The table item has its own DataSource and Filters properties.
The target of the ToggleVisibilityAction will be the Table item.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or