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

Nested subreports, 1 data source

1 Answer 114 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gersh
Top achievements
Rank 2
Gersh asked on 20 Jul 2012, 08:26 PM
For the past few weeks, I've been posting threads that have gotten progress, but  I think I hit a wall that if I can get over, will complete my project. So here it goes:

I have a rowset of data that i want to deflatten.
Example:
gid, gname, uid, uname
I want it to have users(uname) grouped by the group(gname) they belong to.  The problem I'm having is since the 1 rowset i pass to every datasource for each subreport i need, the data duplicates according to the number of rows to that rowset.So if i have group A  with 5 members and group B with 3 members. group A repeats 5 times and B 3 times.

Any help with this would be great!
Gersh

1 Answer, 1 is accepted

Sort by
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 25 Jul 2012, 08:09 AM
It sounds like you first group the data and then to each subReport you pass the whole group as data-source which causes the repeated items.
Either 1) Send only 1 record per subreport (not the whole group)
or       2) Use only 1 subreport to display the whole group. 

The way i see it is the following:
Main report with some DataSource - set grouping to that DataSource. For each row of the DataSource you will have one Detail section with the current record. Inside the Detail Section  place the SubReport item. the SubReport.DataSource will be "= ReportItem.DataObject" a.k.a. the current DataObject for the current detail section (or one user only). 
Tags
General Discussions
Asked by
Gersh
Top achievements
Rank 2
Answers by
Hadib Ahmabi
Top achievements
Rank 1
Share this question
or