If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > is there any sample code to build an Oraganization chart?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-28-03, 02:52
per per is offline
Registered User
 
Join Date: Jun 2003
Posts: 9
Smile is there any sample code to build an Oraganization chart?

im looking for some sample code to draw,build or generate an organiztion chart, cause im not very good at algorithm
and all i found is just a binary tree so it's not much useful for an organization chart.
thanks in advance,
Reply With Quote
  #2 (permalink)  
Old 07-30-03, 08:46
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Perhaps search here:

HotScripts.com
http://www.hotscripts.com

Planet Source Code
http://www.planet-source-code.com

The ASP Resource Index
http://www.aspin.com
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
  #3 (permalink)  
Old 07-30-03, 22:17
per per is offline
Registered User
 
Join Date: Jun 2003
Posts: 9
i've searched all of those web site but never found anything close to what im looking for. i found one component(not free) with a powerful tools to create an organization chart on the web(just only one that i've found) but i just want a sample code to learn , not a complete package.
i wonder that there is no a sample code about organization chart?

my database is just look like this

id name parent_id
1 A null <--------root
2 B 1
3 C 1
4 D 1
5 E 2
6 F 2
7 G 3
8 H 4
9 I 4
10 J 4
11 K 9

and the result should look like this (with link line)

A
|
|------------------|-----------------|
B C D
|----------| | |----|---------|
E F G H I J
|
K

that's it =)
and by the way,this post will cut all space ,so my result chart may look not very right.
thanks,
Reply With Quote
  #4 (permalink)  
Old 07-31-03, 08:16
unatratnag unatratnag is offline
Registered User
 
Join Date: Jul 2003
Location: Ohio/Chicago
Posts: 75
pehaps it would help if you provided a link to a page where you could control how the chart should look
Reply With Quote
  #5 (permalink)  
Old 07-31-03, 22:57
per per is offline
Registered User
 
Join Date: Jun 2003
Posts: 9
Reply With Quote
  #6 (permalink)  
Old 08-06-03, 05:15
aliayen aliayen is offline
Registered User
 
Join Date: Aug 2003
Location: Kayseri-Turkiye
Posts: 7
Recursion

You can do it with recursive functions, with tree graphs.

If you were using Oracle, you would be able to use CONNECT BY statement to do this.

You can read Mr. Celko 's articles @:

http://www.dbmsmag.com/9603d06.html
http://www.dbmsmag.com/9604d06.html
http://www.dbmsmag.com/9605d06.html
http://www.dbmsmag.com/9606d06.html
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On