Question

I'm trying to create a report that display's a document that is in the DB across multiple tables. I have the querys and datasets set up fine, I'm just having issues grouping it right on the report itself.

To make it clear

I have one Row from Dataset A that needs to be displayed and under it, each Row from dataset B.

like

        Dataset A fields 
        (basically a "for each")
         Dataset B fields

         Just keep repeating "for each"

How do I go about this?

Était-ce utile?

La solution

What you do is return the relevant field(s) from Dataset A on every row with the fields from Dataset B and then group on the Dataset A field. For example:

SELECT DatasetA.Id, DatasetB.Code, DatasetB_Description, DatasetB.Value
FROM DatasetA
INNER JOIN DatasetB ON DatasetA.Id = DatasetB.DatasetA_Id

On your tablix, create a group that changes on Id and put the DatasetB fields in the Detail row of the tablix. Now each time DatasetA.Id changes, it will trigger a new group header and display all the DatasetB rows that relate to that DatasetA Id under it.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top