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

Functionality like master - detail nested grid?

4 Answers 218 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 21 Oct 2011, 09:19 PM
With the GRID asp.net component you can set up a nested grid so that each row in the master table has a nested detail table under it. I would like to reproduce this functionality in a report that is only intended for PDF output so no collapsing is necessary. This is for a assembly ticket that shows part kits to be assembled and their component parts. So it looks something like this

MASTER: Bin - Part Number - Description - Qty Ordered - Qty Backordered - UOM
MASTER: Bin - Part Number - Description - Qty Ordered - Qty Backordered - UOM
  Detail:    Bin - Component Part - Quantity - UOM
  Detail:    Bin - Component Part - Quantity - UOM
  Detail:    Bin - Component Part - Quantity - UOM
MASTER: Bin - Part Number - Description - Qty Ordered - Qty Backordered - UOM
  Detail:    Bin - Component Part - Quantity - UOM

Note that sometimes a part may not have any components, so nothing would need to be shown under those.

Ideally the master table and the detail tables would have separate datasources just like the GRID implementation.

Wish so may options (crosstabs, subreports etc... ) it's hard to get started down the right path. Can someone point me in the direction of a tutorial or sample of a solution of a solution for this?

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 26 Oct 2011, 12:28 PM
Hello James,

Generally for reports with table layouts we highly recommend to utilize Table/Crosstab data item. Report data items by default work with different datasource components. Thus our suggestion is to add a merged row group and nest the inner table. Additionally in order to hide the row group when no data is available you can set up a group filter. In order to explore, locate the respective crosstab group row group and set up a filter you can use the group explorer.

You may find useful the Table and CrossTab Wizards help article.

Kind regards,
Peter
the Telerik team

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

0
James
Top achievements
Rank 1
answered on 08 Nov 2011, 11:00 PM
Everything here seems to make sense except how do I create a merged row group, and nest the inner table.
0
James
Top achievements
Rank 1
answered on 09 Nov 2011, 12:04 AM
Okay,

I believe I know how to set up the table now after playing around some. But each nested table will need a parameter from the previous row. How do I pass that parameter to the datasource of the nested table?
0
Peter
Telerik team
answered on 14 Nov 2011, 09:45 AM
Hello James,

The ReportItem.DataObject expression references the parent's data item (in your case parent table) data. In this line of thoughts the ReportItem.DataObject.MyField retrieves the MyField from the parent table's datasource. Thus our suggestion is to use datasource components relations capability. For example when SqlDataSource1 is set to table1 and SqlDataSource2 is set to the nested table2. You can set SqlDataSource2 datasource parameter to a SqlDataSource1 field as shown in the following example:

 Name

 Type

Value 

 @MyField

String

= ReportItem.DataObject.MyField

All the best,
Peter
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
James
Top achievements
Rank 1
Answers by
Peter
Telerik team
James
Top achievements
Rank 1
Share this question
or