Author Topic: Visio Data Binding 1 shape to many records  (Read 5629 times)

0 Members and 1 Guest are viewing this topic.

retroviz

  • Newbie
  • *
  • Posts: 3
Visio Data Binding 1 shape to many records
« on: August 05, 2009, 11:59:16 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1735
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Visio Data Binding 1 shape to many records
« Reply #1 on: August 05, 2009, 12:12:39 PM »
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

  • Newbie
  • *
  • Posts: 3
Re: Visio Data Binding 1 shape to many records
« Reply #2 on: August 05, 2009, 01:42:51 PM »
Hi, I am using Visio 2003 but if I can use Visio 2007 for this then I will get that.

retroviz

  • Newbie
  • *
  • Posts: 3
Re: Visio Data Binding 1 shape to many records
« Reply #3 on: August 06, 2009, 10:32:16 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1735
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Visio Data Binding 1 shape to many records
« Reply #4 on: August 06, 2009, 11:50:03 AM »
This article might be worth a look, anyway: 12 Month Data Graphic Shape (almost)
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010