Extending Data Linking to External Lists in Visio 2010 and Visio Services

When I speak to SharePoint developers about the dashboard and API capabilities of Visio Services the first question I get asked is, “Can I link shapes in Visio 2010 to an External List and have Visio Services refresh the data in the published diagrams from the External List?”.  The short answer is no, Visio 2010 and Visio Services support the following data sources out of the box for refresh on both the client and the server: SQL Server, Excel Services, SharePoint Lists, and OLE DB / ODBC.

Fortunately, both Visio 2010 and Visio Services have a fantastic extensibility model, giving you the ability to build a solution that will allow both the client and the server to link to any data source that is not supported out of the box.

Introducing the BDC Connector for Visio

For this article I am releasing a sample solution which allows both Visio 2010 Professional and Premium and Visio Services to connect to and refresh from an External List hosted on a SharePoint 2010 site.  This solution is broken into 2 separate components; (1) An add-in for the Visio 2010 client giving the user the ability to establish a connection to an External List and link the data to the shapes in their diagram; (2) A custom data adapter that provides Visio Services with the ability to refresh the data from the connection that is established with the External List.

The client add-in

After installing the BDC Connector for Visio a new group, “External Lists”, will be visible on the Data tab in the Ribbon as shown below.

image

Clicking the Link Data to Shapes button simply prompts the user to enter the name/URL of the SharePoint site where the External List resides.  Once a valid site name/URL has been entered the user can then choose the dropdown button to see a list of all External Lists available from the provided site.

image

Simply select the appropriate External List and click the OK button.  After clicking the OK button, the add-in will attempt to connect to the External List and import all the data from the list as an External Data record set.

An example of an External Data record set is shown below…

image

Once the data from the External List has been connected to the diagram the user can use the standard out of box Data Linking and Data Graphics features to link the rows of data from the External List to shapes in the diagram, and surface the data using Data Graphics.

For an overview of Data Graphic capabilities please review this article, Enhance your data with Data Graphics

The custom data adapter

As part of this solution I also provided the custom data adapter for Visio Services which enables published diagrams to be refreshed from an External List by Visio Services automatically.

If you are not familiar with Visio Services then take a look at this article, Introducing Visio Services.

The VisioBdcDataModule.ZIP file included with the download contains the WSP solution package and the scripts to deploy and retract the solution package to your farm.

Open the SharePoint Management Console as an administrator

image

and run the InstallDataModule.ps1 script.

This will install and register the data module with Visio Services.  If needed the RemoveDataModule.ps1 script can be run to retract the data module from your farm.

Download

Click the link below to download the ZIP package.  The ZIP package contains a complete users guide that outlines installation on the client and the server as well as a simple tutorial.

System requirements for the client add-in:

Visio 2010 Professional or Premium
SharePoint 2010 Client Runtime (free download)

BDC Connector for Visio v1.0.0.1003.zip