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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to show this data as indented?

Status
Not open for further replies.
Oct 11, 2006
300
US
Hi,

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.


 
Please ignore this post. I forgot that I had posted a similar question here and got a few answers.

Sorry for the inconvenience.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top