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

Table is being repeated in a master-detail report page

3 Answers 1498 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 16 Oct 2018, 06:06 PM

Created master-detail reports using, https://docs.telerik.com/reporting/designing-reports-master-detail#configure-the-report-parameter-and-filter.  So both the master page and the detail page each have data sources, with the detail page data source having a parameter from parent to filter its data.

In the detail report, when I drag-drop an attribute from its data source to a textbox it's fine.

But when I insert a table and bind the data source to the table, the table's data binding itself works fine, but the table itself is being repeated as many times as there are rows in the data source, each having as many rows as in the data source.

If I remove the data source from the table, then no rows show... so doesn't work...

I may be doing something wrong... what..?

3 Answers, 1 is accepted

Sort by
0
Edward
Top achievements
Rank 1
answered on 16 Oct 2018, 06:07 PM
Addendum: it's the table that's being repeated, not the rows in a single table...
0
Edward
Top achievements
Rank 1
answered on 17 Oct 2018, 02:58 PM

Found out that indeed the datasource property was being set at two places in the subreport.  The table had it set, but also the master report (the parent report) in the subreport's report explorer (in the report designer) had the datasource property set too.  

This may be an usability issue.  

The master report has it's own datasource set in its own report designer.

But in the subreport, the report explorer of the designer IDE, shows the master report (i.e. the parent report) as well, and it too can have its datasource set to something else (it does not default to its own datasource in the master report's own designer settings).

 

Also when clicking around in the subreport's designer interface often the parent's report is activated by default and so thinking one is setting the datasource of a subreport or an element in it like a table, if one does not check, he/she may actually set the parent's datasource.

 

This was the culprit.  Removed the datasource of the parent's report from within the subreport's designer, and table stopped being repeated.  This point "may" not have been made clear in other posts where data repeat issue was reported....

0
Silviya
Telerik team
answered on 19 Oct 2018, 11:04 AM
Hi Edward,

When a Report is databound, it is intended that the detail section will be duplicated for each row returned by the dataset. A Table can also be databound, and the expected result is that the detail row of the table will be duplicated for each row in the dataset. When both are databound, and the table is inside the detail section - you will see multiple copies of the table (with the headers).

In order to get rid of the repeating Tables, there are two possible approaches: 
  1. Leave the DataSource of the report to None and set only the DataSource of the Table item.
  2. Move the Table to a report section that doesn't duplicate - such as group headers or footers of a static group.

I'm happy to assist if any additional questions come up.


Regards,
Silviya
Progress Telerik
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
Edward
Top achievements
Rank 1
Answers by
Edward
Top achievements
Rank 1
Silviya
Telerik team
Share this question
or