Book chapter landing page: Chapter 3: Linking Data to Shapes (Visualizing Information with Microsoft Office Visio 2007)
This article is an excerpt from Visualizing Information with Microsoft Office Visio 2007 by David J. Parker from McGraw-Hill (ISBN 13: 9780071482615 copyright McGraw-Hill Companies 2007, all rights reserved) with permission from McGraw-Hill Professional. No part of this chapter may be reproduced, stored in a retrieval system, or transmitted in any form or by any means—electronic, electrostatic, mechanical, photocopying, recording, or otherwise—without the prior written permission of the publisher, except in the case of brief quotations embodied in critical articles or reviews.
The Link Data to Shapes tool is the backbone of the new features in Microsoft Visio 2007. It may not have the immediate impact of the flashy Data Graphics tool, but they are of no use without the data in the shapes in the first place. The data in Visio is what makes it so suitable for use as a corporate tool.
The Link Data to Shapes tool is only for viewing information from a data source—it does not let you edit the data, and then update the data source. The older tool, Database Wizard, has that capability, but Link Data also allows a shape to be linked to multiple data sources. This is a crucial difference because it means you can overlay, say, a list of designated fire marshals from a departmental spreadsheet on personnel shapes from the corporate HR database. Then, if your personnel are laid out on a floor plan, you could use the new Data Graphics tool to highlight the fire marshals, and you can visually check that their distribution is satisfactory. Similarly, you could identify PCs that are missing a required software patch.
The list of useful scenarios for simple visualization of data is endless, but their usefulness is constrained by the veracity of the supplied data.
A variety of types of data can be linked to Visio, including Microsoft Excel, Microsoft Access, Microsoft SQL Server and SharePoint Services Lists, or any suitable OLEDB or ODBC data source. Although you can easily link to Microsoft Excel, I prefer to use a data source that can identify the data type in each column explicitly. In particular, I have had trouble where a few numbers, as well as text, were in a single column.
Microsoft Visio 2007 installs a sample Access database (DBSample.mdb), usually found in C:\Program Files\Microsoft Office\Office 12\1033, and accessible via the ODBC User DSN called Visio Database Samples. This database has a few sample tables we can use to demonstrate linking data with.