This blog shows an example of how to create a Visio diagram with external data and publish it to SharePoint 2010.
Prerequisites:
- Visio Services 2010
- SharePoint 2010
- An external datasource
- Target application ID created in Secure Store Service App
- Target application ID connected to Visio Service App
1:
Open Visio and create your own Visio diagram, I created a diagram which shows revenue per country per employee. You can also make a diagram which visualizes your network infrastructure or shows a specific process (flowchart) of your company.
Save the Visio diagram as a "Web drawing"
3:
New in Visio 2010 (Professional and Premium versions) is the Data-tab, click on this tab and observe the new possibilities!
Click on Link data to shapes, choose your datasource (I've chosen SQL Server) and select the data/columns you want to use in your diagram (the data you want to link to your Visio Shapes).
5:
When you successfully created a connection you see the External Data Window below your Visio diagram with your chosen resultset.
6:
If you're dataset is correct, click in the datatab on Data Graphics and create an new data graphic.
7:
Click in the top left on new item (image below) and now you can add some treshholds and checks. These items will be connected to your data graphics item you just created. See examples below:
Example 1
Example 2
Example 3
8:
Now it's time to connect the data to the Visio shapes, there are two ways to do this:
- Select a shape in the Shape selector en pick a specific row in de external data window and drag this row to the diagram.
- Drag a shap to the diagram en connect a row to the shape afterwards
After you connected your rows your diagram could look like this:
Now it's time to connect the data to the Visio shapes, there are two ways to do this:
- Select a shape in the Shape selector en pick a specific row in de external data window and drag this row to the diagram.
- Drag a shap to the diagram en connect a row to the shape afterwards
After you connected your rows your diagram could look like this:
On your right hand side you can see the Shape data window (see picture above)
10:
Now we're ready to save (share) it to SharePoint, click on file and the backstage appears, choose share and choose a Sharepoint library where you want to store the Visio Web Drawing.
11:Open a SharePoint site and edit the page, choose to insert a new webpart and choose Office client applications, and Visio Web Access. Click add to add the webpart to your site.
In the tool pane of the webpart, select your new Visio diagram, change some settings if you think it's necessary. Click apply and ok in the webpart-properties. Check-in your page and your SharePoint site with Visio could look like this:
Visio ask you if you want to refresh the underlying data when the diagram refreshes. Click on "Refresh always" if you want to do that.
Congratulations: Your first Visio integration with SP2010 is a fact!
No comments:
Post a Comment