Page 1 of 1

How to create a one to many report?

Posted: Fri Sep 25, 2009 11:00 am
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!

How to create a one to many report?

Posted: Fri Sep 25, 2009 12:47 pm
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.

How to create a one to many report?

Posted: Sat Sep 26, 2009 2:08 pm
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!