How can I display a hierarchal relationship in a report?

D

David Frick

How can I display a hierarchal relationship in an Access report?

I have an employees table with an EmployeeID and a ReportsToID. The
ReportsToID contains the EmployeeID of the manager that the employee reports
to. So the table looks something like this:

EmployeeID Name ReportsToID
1 Bill NULL
2 Dave 1
3 Sue 1
4 Sally 2
5 Jim 3
6 John 3

I want the report to display as:

Bill
Dave
Sue

Dave
Sally

Sue
Jim
John

Does anyone have any idea how to create such a report?
 
H

HSalim

David
Create a report based on Employees
add a subreport also based on Employees
in the subforms's properties:
Link Child Fields : ReportsToID
Link Master Fields: EmployeeID

Ta da!

HS
 
D

David Frick

Thanks !!


HSalim said:
David
Create a report based on Employees
add a subreport also based on Employees
in the subforms's properties:
Link Child Fields : ReportsToID
Link Master Fields: EmployeeID

Ta da!

HS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top