Continuing with the BI thread, I was demoing dynamic reporting using SharePoint 2010 Visio Services during a recent Project Server BI spiel in Houston. What struck me with the crowd, which was primarily from the oil and gas industry, was the interest in the Visio timeline. I must admit, having used Microsoft Project for so long, I kinda forgot how many folks still use the Visio timeline view for reporting and scheduling purposes. So it seemed to me that this would be a great example for a post on Visio Services in SharePoint 2010.
That being said, I must admit that much of this would work in 2007. The difference in 2007 is that the ODC file is not out of the box, and to display the Visio document in SharePoint, you will need either a third party tool – or deploy a custom webpart (here). Note that in theory you could also apply the same principles to a SharePoint list synchronized with Microsoft Project Professional 2010, or Microsoft Project Professional 2007 using a third party add-in such as Project Publisher.
Note that the screenshots will all be using the 2010 Beta versions of the Microsoft Office product line.
Credit to David Parker’s Visio blog (here) for getting me most of the way there.
Usage Scenario
This is a generic example of Visio Reports, of which there are a number of potential use cases. This particular example is built around the Visio Timeline view which is used in many companies to present high level schedules. The 2010 MPP timeline function serves much the same purpose, although currently I am not aware of any way to programmatically take the timeline view from a Microsoft Project file and present it via a Web interface.
Instructions
1) Prepare your ODC file. (instructions here) The main thing that will help in this scenario is to filter on a specific project, and on all of the top level tasks/milestones in the project. Note that you can include all fields from the ODC file in the results, as we will go back in Visio and filter out the fields we don’t need.
2) Create a blank timeline view in Microsoft Visio.

3) Here we have several options. You could opt to create the Visio timeline from scratch, and then link the data. On the other hand, if you’re lazy like me, you might just take a copy of the MPP file and import it directly into the Visio diagram, thereby populating all of the key elements and naming them correctly – in which case all you need to do is Auto-Link the elements from the ODC file and you’re off to the races. We’ll opt for the latter option.
4) If you’re using Microsoft Project desktop, save a copy of the file to your desktop and work with that. If you’re working with Microsoft Office Project Server, save a copy of the file offline to your desktop, then use that as the base file.
5) Select the timeline menu in the Ribbon. Import data from the MPP file saved to your desktop.
6) Configure the options to generate a look and feel appropriate to your needs.
7) The result should look something like this. Don’t worry about the formatting now. We can adjust that later. Note that all of the elements have the correct names – which we can now use to Auto-Link the ODC data.
8) Now add the Data Link to the ODC file prepared already.
9) You’ll see the top level data appear in the External Data Window at the bottom of the screen.
10) Now we need to configure the columns that we would like to use. Right click on the data link view at the bottom of the screen. Choose Column Settings.
11) Check or uncheck the fields that you would like to include as part of the shape data.
12) Change the names of the key fields to map to the shape field names (further instructions here). By doing so, the Auto-Link function will import the ODC data to the correct parameters in the Visio diagram. The key fields to be changed will be as follows:
TaskStartDate > Start
TaskFinishDate > Finish
TaskPercentCompleted > Percent Complete
13) Set the data to Auto-Link using the Task Name as the unique identifier.
14) Since the items were named during the import from the MPP file, the names should be the same as the elements in the ODC file.
15) You’ll now see that the data from the ODC file has all been linked to the shapes.
…and that’s about it…feel free to format the timeline any way you would like – or to add Data Graphics tied to specific Reporting Database level fields.
Displaying the Data
With SharePoint 2010, we can now publish the data to Visio Services through functionality in the Backstage View. (Note that I have blurred the Web folders that show up by default on my laptop as they may give away sensitive client information.)
And now the timeline is displayed dynamically using Visio Services – and can be surfaced using a Visio Services Webpart.
I can also select an element, and expose whatever fields I would like in the Shape Information Pane – in the browser.
And there you are….dynamic Visio timelines using Visio Services and ODC connectors.