Monday, 30 May 2011

Spatial Reporting for Microsoft Dynamics CRM

Bit of a weekend project but was quite excited at the possibilities with this one.

I wanted to have a play with SQL 2008's ability to report using geospacial data. With that in mind I created a basic report that would pick up Longitude and Latitude from a contact record in CRM (I’ll come back to the whole latitude and longitude in a bit). The new SQL Server 2008 allows you to report geographically and display on a map which is nice.

The initial result if you have a longitude and latitude field in the contact record is something like this:






Thinking about how users could use this sort of information is interesting. Contacts could be grouped in views or after an advanced fined then run the report contextually. The pushpins could be hyperlinked back to the relevant CRM record etc.

The trick with this was the Longitude Latitude. Having to add it manually would be a non-starter for users, especially if there are hundreds or even thousands of records, so I wrote a little script that would grab the Postcode, which should be in every record, and get the longitude and latitude from the BingMaps API, posting it into 2 new fields I created to store the Longitude and Latitude.

This is still a work in progress, but a nice use of CRM, SQL and Bingmaps.

0 comments:

Post a Comment