ReportingAnalyst
MIS
Hi,
This is my result set from which I would like to show an indented hierarchy:
Here W.McMonigal is the manager and all the others are his subordinates. This is a sample data set I showed to make it more clearer. Sometimes this recordset can have indent values of 3, 4 and 5 where 5 is under 4 and 4 is under 3.
Now what I would like to do is:
How can I show the indention in my ASP page based on the values of the indentation?
For instance, loop through the entire recordset, find the lowest number. for the lowest number, I display the manager with the least indentation, then subsequently increase the indentation by a said number of points.
Any ideas how I can do this?
Thanks.
This is my result set from which I would like to show an indented hierarchy:
Code:
Emp_Name Indent Mgr_ID Sub_ID Lft Rgt
William McMonigal 4 862336 862336 604 617
David Block 5 862336 627298 605 606
Joseph Hennessy 5 862336 862337 607 608
Jason Pitre 5 862336 862339 609 610
George Seth 5 862336 862362 611 612
John Spartz 5 862336 862363 613 614
Tim Krug 5 862336 2356682 615 616
Here W.McMonigal is the manager and all the others are his subordinates. This is a sample data set I showed to make it more clearer. Sometimes this recordset can have indent values of 3, 4 and 5 where 5 is under 4 and 4 is under 3.
Now what I would like to do is:
How can I show the indention in my ASP page based on the values of the indentation?
For instance, loop through the entire recordset, find the lowest number. for the lowest number, I display the manager with the least indentation, then subsequently increase the indentation by a said number of points.
Any ideas how I can do this?
Thanks.