In Chapter 14, “Building a Management Dashboard Solution,” we developed a management dashboard using SQL Reporting Services and PerformancePoint Services. In this chapter, we create a new dashboard to display Contoso sales data using Excel and Visio Graphics Services. Before we move forward with this chapter, make sure these services are installed and configured correctly on your SharePoint farm.
Review Chapter 2, “Excel Services in SharePoint 2010,” and Chapter 11, “Visio Graphics Service Configuration,” to learn more about how to install and configure Visio and Excel Services on your SharePoint farm.
In Chapter 14, the dashboard we developed was composed of several different business intelligence (BI) components. Performance Point Service Scorecard, Analytic Chart, and a SQL Server Reporting Services Report were used to prepare the dashboard. In addition, the dashboard contained a filter on the Calendar Year connected to each of the dashboard components. This new dashboard will use the Visio Web Access web part to display a Visio web drawing on a dashboard page. Drawing will be using an Excel Services data sheet as a back-end data source.
Note that this new Visio dashboard is not a replacement of the dashboard we created in Chapter 14. This exercise was done to explain how Visio web drawings can be integrated with SharePoint 2010.
Before we start, we need to prepare an Excel sheet that we will deploy on a SharePoint 2010 document library. We will use this Excel sheet as an external data source for our web drawing. You can either create this sheet manually by executing a shared SQL query against ContosoRetailDW database or access this sheet from the book’s resource material. This Excel sheet shows annual sales data, by continent, for all years:
SELECT C.ContinentName
, D.CalendarYearLabel
, SUM(A.SalesAmount) AS SalesAmount
, SUM(A.ReturnAmount) AS ReturnAmount
, SUM(A.DiscountAmount) AS DiscountAmount
, SUM(A.TotalCost) AS TotalCost
, SUM(A.SalesAmount)-SUM(A.TotalCost) AS Margin
FROM dbo.FactSales A
INNER JOIN dbo.DimStore B
ON A.StoreKey = B.StoreKey
INNER JOIN dbo.DimGeography C
ON B.GeographyKey = C.GeographyKey
INNER JOIN dbo.DimDate D
ON A.DateKey = D.Datekey
GROUP BY C.ContinentName
, D.CalendarYearLabel
ORDER BY C.ContinentName
, D.CalendarYearLabel
When the Excel sheet is ready, publish it on a SharePoint document library. Also, verify that you can open this Excel sheet in the browser by clicking the sheet name in the document library.
Start Microsoft Visio Premium Edition and create a blank drawing with landscape page orientation. Page orientation can be changed from the Design tab on the top menu bar. When you have a blank drawing page up, follow these steps to connect your drawing to the SalesByContinent.xlsx Excel sheet:
Figure 15.1. Excel sheet in a browser.
You will see your sales data at the bottom of your blank drawing. We will use this data now to link it to actual shapes.
At this point, we have our Visio web drawing ready. Our next task is to create the dashboard page, which we will use to display this drawing using the Visio Web Access web part. To create a new dashboard page, follow these steps:
At this point, we have our Visio Web Access web part page. Now we will add a custom list to our site and connect that list item to the shapes in our Visio web drawing:
Our next step is to link our SharePoint Foundation list with the Visio Web Access web part:
After you click Finish, a Select column appears on your Calendar Year custom list with a Link icon. You can click that Link icon to pass the associated year value to your web drawing. Drawing filters the page based on the year value you pass to the drawing.
We will now create another SharePoint Foundation list for continents. This time when we will select a continent, the actual continent shape will be highlighted in our web drawing:
Figure 15.5. Custom SharePoint Foundation list: Calendar Year.
Figure 15.6. Custom SharePoint Foundation list: Continents.
At this point, we have a dashboard that displays sales data by continent for three years. This dashboard is using data from an Excel sheet hosted on the same SharePoint site. It is also using SharePoint Foundation lists to interact with a Visio web drawing on the same dashboard page.
This chapter showed how you can use data-driven Visio web drawings on a dashboard page using Visio Web Access web parts. This chapter also covered how to use SharePoint Foundation list items to either select the page on your drawing or highlight the shapes on your drawing using values passed from the list. This technique can be used as a filter.
The Visio web drawing we created displays sales data by continent. The solution utilizes the Visio Graphics Service and Excel Services to provide the proper visualization of business performance data by continent.
The following are best practices from this chapter:
• To open a Visio drawing in a browser via SharePoint site, you must save your drawing file as a web drawing (.vdw file).
• When connecting to a SQL Server database from a Visio web drawing, use an ODC file stored on the same SharePoint site as your Visio web drawing. This helps you with maintaining a single connection file for all Visio web drawings.
• The Automatically Link button under the Data menu lets you quickly link your data rows to shapes. It is handy when dealing with many data rows.
• It is important to use legends when defining data as nontext. You can create a legend quickly by using the Insert Legend button under the Data menu.
• You can copy and paste shapes to quickly create shapes of the same size on your drawing.