Visio Data Binding 1 shape to many records

Started by retroviz, August 05, 2009, 04:59:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

retroviz

Hi there. Hopefully someone can help me.

In Visio I see it possible to bind properties of a shape to an external database.

In my case I want to have a floor plan with desk information being retrieved from a database:

Desk Reference (e.g. D1)
Allocation (e.g. user or site)
Name (e.g. name of user or name of department).

This seems easy enough. However, I need to display on the shape the network ports that are attached to this desk. In my database I have a DeskPortMapping table that stores these assignments. One key point is that the number of ports on each desk can be variable (so I cannot create fields for Port1, Port2, Port3 etc.).

I cannot see how to display multiple records inside one shape. Ultamately I want my desk to display like so:

Desk Ref: D1
Allocation: User
Name: John Smith
Port 1134 - Network
Port 1135 - Printer
Port 1136 - Phone
Port 1137 - Blank

I then may have another desk like:

Desk Ref: D2
Allocation: Site
Name: Accounts
Port 1118 - Printer
Port 1119 - Blank

I suppose one way would be to dynamically generate the port details at database level so in fact it does map to just one property on the shape.

Has anyone done anything like this before? I would be interested to know what technique was used.

Ideally I would like to drag a desk onto the drawing, select a db record and show all the above information on the shape.

Thanks,

Ben






Visio Guy

Hey Ben,

Just a quick check, are you using Visio 2007 Pro? I'm pretty sure you can map different databases to different fields on a shape, but I've no time to check right now, off to the biergarten right now...
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

retroviz

Hi, I am using Visio 2003 but if I can use Visio 2007 for this then I will get that.

retroviz

Think ive answered my own question. You can not link to multiple rows in the same recordset in visio so I think my original thought of creating the list of ports at the database level will be the most suitable.

Thanks for your help anyway.

Visio Guy

For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010