Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drill down of hierarchical data

Status
Not open for further replies.

tsusnik

Technical User
Aug 23, 2001
43
0
0
SI
I have a table of hierarchical data such as employee with column manager_id which references the same table employee. Data in the table is something like:

Code:
[b]  employee_id   employee_name    manager_id[/b]
  1             King             
  2             Greenberg        1
  3             Faviet           2
  4             Chen             2
  5             Sciarra          1
  6             Urman            5
  7             Popp             5

Is there a way in Crystal Reports 9 to display the data as follows and have the option to drill down levels:

King
Greenberg
Faviet
Chen
Sciarra
Urman
Popp

Note that the number of levels is not limited.
 
Add the table in second time and LO join the empid to managerid.

Now group by the manager id.

As for indenting, you might use a formula to add tabs to the beginning of the name based on the manager id:

replicatestring(chr(7),{table.managerid})&{table,name}

-k
 
Add the table in second time and LO join the empid to managerid.

Now group by the manager id.

As for indenting, you might use a formula to add tabs to the beginning of the name based on the manager id:

replicatestring(chr(7),{table.managerid})&{table.name}

-k
 
There is an option to create hierarchical report.

Create group with Employee ID then go to Reports tab, click on Hierarchical Options. In the parent ID field select the Manager ID, u will be getting the result.

Shankar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top