Friday, February 24, 2012

List grouping

I am needed assistance with getting multiple datasets data in one LIST.
I have 1 parent table with 2 child tables.
The parent table contains the primary key for the 2 child tables.
This is a 1 to many relationship to both the child tables where 1 child
table could have 5 records and the other could have 15.
I need data from the parent as well.
I am having a hard time getting this data grouped on the ID when trying to
nest a list inside a list. It does not seem to work.
Any suggestions?
--
<moojjoo/>Hi
I am not sure I understand the requirement but if it is grouping you
are after , why not use a stored procedure to shape your dataset so
that the parent and child ids are returned together. That way you will
not need multiple lists.
Cheers
Shai
On Nov 30, 1:25 am, Moojjoo <Mooj...@.discussions.microsoft.com> wrote:
> I am needed assistance with getting multiple datasets data in one LIST.
> I have 1 parent table with 2 child tables.
> The parent table contains the primary key for the 2 child tables.
> This is a 1 to many relationship to both the child tables where 1 child
> table could have 5 records and the other could have 15.
> I need data from the parent as well.
> I am having a hard time getting this data grouped on the ID when trying to
> nest a list inside a list. It does not seem to work.
> Any suggestions?
> --
> <moojjoo/>|||Shaikat,
I got it to work using Subreports. Pretty cool solution and I believe that
is the right way to do it, but remember there is always more then one way to
skin a cat. Or program as we all know.
I basically had an ID = RaID (Parent) in table "Risk Assessment"
With two other child tables called - "Control Gap" and "Mitigation Control"
both with the foreign key of RaID.
Now there could have been 20 Control Gaps and 2 Mitigation Controls related
to that RaID foreign key plus i was pulling data from the parent table hence
using joins to return all the data, but as you kow repeating rows were be
returned.
So to solve the problem I basically passed the RaID from the SSRS LIST to 2
sub reports as parameters to only return the data based on the RaId and that
way the data would return properly. I read a number of articles and learned
this was the best way to do this since the control gap data and mitigating
data were both sub data of the Parent table.
I am what you would call a high novice to SQL Server and walking with
Reporting services.
I was wondering are there issues with having numerous datasets for reports.
I have yet to see a performance issue. I have based all my datasets from
stored proces and every thing is running great.
My training - reading books and hacking away for 10 years with Microsoft
Products. Thank you Microsoft for helping me earn a pay check. Maybe one
day I will make it as an MVP.
--
<moojjoo/>
"shaikat.das@.gmail.com" wrote:
> Hi
> I am not sure I understand the requirement but if it is grouping you
> are after , why not use a stored procedure to shape your dataset so
> that the parent and child ids are returned together. That way you will
> not need multiple lists.
> Cheers
> Shai
> On Nov 30, 1:25 am, Moojjoo <Mooj...@.discussions.microsoft.com> wrote:
> > I am needed assistance with getting multiple datasets data in one LIST.
> >
> > I have 1 parent table with 2 child tables.
> >
> > The parent table contains the primary key for the 2 child tables.
> >
> > This is a 1 to many relationship to both the child tables where 1 child
> > table could have 5 records and the other could have 15.
> >
> > I need data from the parent as well.
> >
> > I am having a hard time getting this data grouped on the ID when trying to
> > nest a list inside a list. It does not seem to work.
> >
> > Any suggestions?
> >
> > --
> > <moojjoo/>
>|||Glad to see you found a solution :-)
Cheers
Shai

No comments:

Post a Comment