Introduction:
SSRS reports prove to be useful in order to visualize the data in Dynamics CRM. SSRS reports contains a number of in-built components like charts, tables, indicators, maps, etc.
In this blog we would like to discuss the Maps control of SSRS reports. The maps control show the data based on the address attributes of a record.
Consider a scenario where we need to show the Est. revenue of all the opportunities in USA based on their potential account’s address. Since we do not have an OOB functionality in CRM to achieve this, so we decided to use the Maps control of SSRS reports in Dynamics CRM.
The Maps control of SSRS reports in Dynamics CRM helps us visualize the data based on the geographical position of the records like address.
Here in this blog we have shown that how we can show the Est. Revenue of opportunities whose potential account is based in USA.
Working:
In order to show the opportunities we created an SSRS report and in the dataset we chose the opportunities whose potential account is based in USA as show in the below query.
1. Query:
<fetch version=”1.0″ output-format=”xml-platform” mapping=”logical” distinct=”false”>
<entity name=”opportunity”>
<attribute name=”name” />
<attribute name=”customerid” />
<attribute name=”estimatedvalue” />
<attribute name=”statuscode” />
<attribute name=”opportunityid” />
<attribute name=”actualvalue” />
<order attribute=”name” descending=”false” />
<link-entity name=”account” from=”accountid” to=”customerid” alias=”ae”>
<attribute name=”address1_stateorprovince” />
<filter type=”and”>
<condition attribute=”address1_country” operator=”eq” value=”USA” />
<condition attribute=”address1_stateorprovince” operator=”not-null” />
</filter>
</link-entity>
</entity>
</fetch>
2. Insert the Map Control in report:
After creating the dataset we insert the map control in the report as shown below:
3. Choose the source of spatial data:
Choose the Map gallery as source of spatial data and then choose the USA by State Inset option under the Map gallery.
4. Choose the Map View options:
In the map view options, select the Add a Bing Maps layer and select the Tile type as shown below:
5. Choose Map Visualization:
In the Map Visualization screen, choose the Color Analytical Map option as we need to show a colored map based on the est. revenue of the opportunities.
6. Choose the Analytical Dataset:
In the dataset section, choose the dataset, which contains the address information of the potential accounts of the opportunities.
7. Map the address fields:
After selecting the dataset, choose the fields that will be used to plot the records.
We can use any of the defined three Spatial Dataset Fields i.e. STATEFP, STUSPS, STATENAME.
Here in this example we are using the STUSPS option to map the account address on the map.
Note: The records we are using for this example contain USA state codes like NY for New York, NE for Nebraska etc.
8. Choose the color theme and data visualization:
Select a theme for the map and also select the field/expression which will be used for the color definition as the Field to visualize.
We can also control the color scheme for the various ranges by selecting the Color rule option.
Check the Display labels checkbox to show the region wise classification factor.
In this example we have chosen the state code to be shown as the label.
Showing the report in CRM:
Finally we can import the above SSRS report in CRM and run the report to show the Est. Revenue of all the opportunities of USA as shown below.
Conclusion:
We can conclude that SSRS reports can be used in various ways and the components of SSRS reports are helpful in data visualization.
Wish to Visualize your Dynamics CRM Data on Map? Try Maplytics – Dynamics CRM + Maps.