Solved

Have SQL data populate a grid in Visio

Posted on 2010-08-22
4
775 Views
Last Modified: 2012-05-10
Hi,

This is a long shot but I wanted to know if it was possible to do the following;

We have supermarkets that we work in and we 'floor plan' these before we start working and map out where all the locations of the blocks are, it's a handy tool for our guys to find what they need to in the stores. What I would like to do is have the grid on a visio page so; A1-ZZ99 (for instance) and if I have an entry in my DB for grid reference B20 (for instance), it colours that little block in in whatever I choose, or highlights it somehow.

This is just a question to you all to see if it's possible to do this type of thing and if not do you know anyway this could be achieved?

Any help would be much appreciated.

Regards,

Ken
0
Comment
Question by:kenuk110
  • 2
  • 2
4 Comments
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 33500479
What you're asking about can definitely be done. While it can be done with any version of Visio, it will be *much* simpler with Visio 2007 Professional or Visio 2010 Professional or Premium.

I've attached a very simple example of something similar that uses the data linking features of Visio Professional. It happens to be a seating chart on which each cubicle changes appearance when the person sitting there needs help. The Visio drawing is controlled by data in the Excel workbook. To see how this example works:
  1. Create this folder
       C:\temp\Needs Help\
    NOTE: you must use this exact folder name for this example.
  2. Unzip the Visio drawing and Excel file into this folder.
  3. Open both the Visio drawing and the Excel file.
  4. Change a few of the TRUE/FALSE entries in the Excel document.
  5. In Visio, select Data>Refresh Data and click the Refresh button. The icons and colors will change as you change the data and refresh the drawing.
A couple of notes:
  • The set of squares on the left use an icon to represent "TRUE"; the squares on the right use a color. These are just two examples of how it can work -- many other options are possible.
  • The data source for this drawing happens to be an Excel file; it can be SQL, SharePoint or almost anything else.
  • It's possible to have the Visio drawing update automatically based on a timer; you can set the timer to any value from 1 minute up.
If this looks like the right sort of idea, please let me know. If what you need is equally simple, we can probably cobble something together for you as part of this question. If what you need is more complex, it may require several questions or it might require a small custom programming project outside of EE.

Regards,
Scott
 



Needs-Help-Seating-Chart.zip
0
 

Author Comment

by:kenuk110
ID: 33500654
Hi Scott, thats brilliant, that's pretty much what I need!

I think what I'll need to do is create a page with a box in each grid then try to link it as you have done. I'll use the same file as you so I can send you it back if I get a little stuck!

Thanks for the response.

Ken
0
 
LVL 30

Accepted Solution

by:
Scott Helmers earned 500 total points
ID: 33501000
Ken,

The key is to have a unique ID in each box in Visio that matches a record in your spreadsheet or database. You can assign the key value in each Visio shape in several ways: 1) manually enter it as shape data; 2) automatically enter is as shape data via a macro; 3) drag and drop a data row from the External Data Window onto a Visio shape.

For more information on Visio's data linking features, see the links in the answer to this question.

For more information about the data graphics you can use to highlight each box, refer to this question.

Scott
0
 

Author Closing Comment

by:kenuk110
ID: 33501092
Thanks for your help, really appreciate it.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Determine next b-weekly date 12 57
t-sql look for records in two tables 2 21
Help with SQL Query 23 39
Contained Database Collations 6 20
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now