SPDataStore.GetDashboard Method
Retrieves a dashboard from a SharePoint list.
Namespace: Microsoft.PerformancePoint.Scorecards.Store
Assembly: Microsoft.PerformancePoint.Scorecards.Store (in Microsoft.PerformancePoint.Scorecards.Store.dll)
Syntax
'Declaration
Public Function GetDashboard ( _
location As RepositoryLocation _
) As Dashboard
'Usage
Dim instance As SPDataStore
Dim location As RepositoryLocation
Dim returnValue As Dashboard
returnValue = instance.GetDashboard(location)
public Dashboard GetDashboard(
RepositoryLocation location
)
Parameters
location
Type: Microsoft.PerformancePoint.Scorecards.RepositoryLocationThe location of the dashboard in the SharePoint list. Only the ItemUrl property must be defined.
Return Value
Type: Microsoft.PerformancePoint.Scorecards.Dashboard
The requested dashboard, or a null reference (Nothing in Visual Basic) if it does not exist.
Implements
IBIMonitoringStore.GetDashboard(RepositoryLocation)
Remarks
PerformancePoint Services in Microsoft SharePoint Server 2010 uses SharePoint lists as the repository for all first class objects except data sources. This method retrieves a dashboard first class object, which represents a dashboard page definition. It does not retrieve a published dashboard, which is stored in a separate Dashboards document library.
Examples
The following code example shows how to retrieve a dashboard from the repository, based on the server-relative path to the object.
Before you can compile this code example, you must do the following:
Configure your development environment and create a C# class library project in Visual Studio. For information about configuring a development environment, see Setting Up the Development Environment for SharePoint 2010 on Windows Vista, Windows 7, and Windows Server 2008.
Add the Microsoft.PerformancePoint.Scorecards.Client, Microsoft.PerformancePoint.Scorecards.ServerCommon, and Microsoft.PerformancePoint.Scorecards.Store DLLs as references to your project. For more information about PerformancePoint Services in Microsoft SharePoint Server 2010 DLLs, see PerformancePoint Services DLLs Used in Development Scenarios.
Add the following using directives to your class.
using Microsoft.PerformancePoint.Scorecards; using Microsoft.PerformancePoint.Scorecards.Store;
Create a method that defines a string variable named "relativePath" to store the server-relative path to the object. The following example path sets the object identifier to "5": /BI Center/Lists/PerformancePoint Content/5_.000.
Paste the following code example into the new method.
// Retrieve the object from the specified location.
// The RepositoryLocation constructor takes the server-relative path to the object.
Dashboard requestedDashboard = SPDataStore.GlobalDataStore.GetDashboard(new RepositoryLocation(relativePath));