How to create a one to many report?

Stimulsoft Reports.NET discussion
Post Reply
fuhrj
Posts: 120
Joined: Wed Jun 11, 2008 12:51 pm
Location: Lancaster, Ohio

How to create a one to many report?

Post by fuhrj »

This is result I am trying to achive:

Code: Select all

Name Departments
John   IT
          Human Resources
          Cafeteria
Mary   Administration
          Mail Room
So basically my datasource has a one to many relationship in the database. My report is coming out like this:

Code: Select all

John        IT
John        Human Resources
John        Cafeteria
etc....
I only want John's name to print once.

I tried messing with the Hierarchial band, child bands and can't get this to work. Is this possible?

Thanks!
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

How to create a one to many report?

Post by Brendan »

Do you have two datasources in your report? one for Names and one for Departments or is it just the one datasource with the name and departments?

If it's a multi datasource report you could use Master / Detail bands.

If it's just the one datasource then you could you set the Processing Duplicates property on your name field to 'Hide'. This will hide any duplicates of the name that occur. You'll probably need to make sure your data is in the proper order for this to work properly.
fuhrj
Posts: 120
Joined: Wed Jun 11, 2008 12:51 pm
Location: Lancaster, Ohio

How to create a one to many report?

Post by fuhrj »

Just one datasource, but I could easily add the other table as its own DS.

I looked at Master/Detail, but I need the employee's name and their department to start on the same line, followed by the remaining departments they are responsible for.

I'll check out your suggestions. Thanks!
Post Reply