Many times during a project, you hit a requirement to have the ability to display an org chart on your SharePoint portal, and because there are many options to do this, it is difficult to know what approach is best for your particular scenario.
Here is a quick way of developing an org chart that the business users can update themselves! There are many options in terms of what data source you can use, such as Excel, MS Access, SQL Server or any OLEDB or ODBC data source.
For this scenario, we simply configure the Visio 2007 Org Chart to retrieve its data from a SharePoint List. The possibilities are endless in terms of how that data gets populated into the SharePoint List as well. For instance, you can write some code to retrieve and cleanup some data before programmatically importing it into the List.
In the end, you would have an org chart that looks something like figure 1.
FIGURE 1 – An Org Chart created in Visio 207, deployed to a SharePoint page and rendered as a PNG image
Getting Started
First, create the SharePoint List and populated it with data, it should look similar to figure 2
FIGURE 2 – A SharePoint List representing the org chart hierarchy
Notice the Reports To column, this column together with the Person Name allow Visio to build the chart appropriately. Now it is time to fire up Visio 2007!
- In Visio, select File > New > Business > Organization Chart
- Select Data > Link Data to Shapes a dialog box allows you to choose the data source, select a SharePoint List
- Type the site url where your lists exists and click next
- Select the appropriate list and click next
When the wizard finishes, you should be able to see the SharePoint list data on your Visio screen. Visio brings in all the columns from the SharePoint List, but you can pick specific columns you would like to show on the shapes themselves.
Now select all the rows and drag them to the center of your page. You should now have an org chart that looks like figure 3
FIGURE 3 – SharePoint List data imported and dragged to center of page
This does not look that appealing does it? So, let’s make a few changes to make it look pretty. First, you want Visio to actually connect the images and show them in a hierarchal view. Select Shape > Re-layout Shapes this should put them in the correct order. Now connect hem by selecting Shape > Connect Shapes
You should now have all shapes connected and in the correct order.
NOTE: We need to make sure that our shapes are always linked to the data source so that if we change the data, it is reflected on our shapes. Select Data > Automatically Link.. You must link the list item ID with the Shape ID, then click Next.
Now simply publish this by saving it to a SharePoint image library and add the image to any page!
Many things can be changed, such as what fields show inside the shape. as well as the color. Remember, you have access to any field on the SharePoint List.
-Oscar