user194076
user194076

Reputation: 9027

Report vertical grouping

I have the following tables:

Person:
Person_Id,
Name

Dog:
Dog_Id,
Person_Id,
Name

I want to show all the dogs below Person name in SSRS report. But When I add parent group, it adds to the left, so I can display dogs only to the right. (I use table control)

So: I want this:

Alex
DogName1
DogName2

Kristy
DogName3
DogName4

But the only way I can get in SSRS is:

Alex   DogName1
       DogName2
Krisy  DogName3
       DogName4

What kind of grouping should I use in order to make this work?

enter image description here

Upvotes: 0

Views: 1100

Answers (1)

user359040
user359040

Reputation:

  • Include group header, detail and group footer level rows in your report
  • Insert Person name into the group header
  • Insert Dog Name into the detail level cell, directly under Person name
  • Insert a blank cell into the group footer (to skip a line between People)

EDIT: Instead of using two datasets, use one dataset with a query like the following:

select p.name person_name,
       d.name dog_name
from person p
inner join dog d on p.person_id = d.person_id

(Change inner join to left outer join if you want to include people who don't own dogs).

Upvotes: 1

Related Questions