PerformancePoint Services Code Sample: Custom Scorecard Transforms
Published: May 2010
Learn about the scorecard transform code examples that are included in the PerformancePoint Services SDK Reference Sample.
The Scorecard Transforms sample for PerformancePoint Services in Microsoft SharePoint Server 2010 is included in the PerformancePoint Services SDK Reference Sample. The sample is designed to show how to create custom scorecard transforms that modify the appearance, contents, or functionality of a PerformancePoint Services scorecard view.
For additional code examples for custom PerformancePoint Services scorecard transforms, see How to: Create Scorecard Transforms for PerformancePoint Services.
We recommend that you use the sample as a template for your custom extensions because it demonstrates best practices for programming with PerformancePoint Services. For more information about supported extension types, see Development Scenarios with PerformancePoint Services.
Applies to: PerformancePoint Services for SharePoint Server, Enterprise version
The sample contains the following scorecard transforms:
AddColumnTransform.cs Defines a PreQuery scorecard transform that dynamically adds a column to a scorecard that contains key performance indicators (KPIs) at the column leaf level.
FormattingTransform.cs Defines a PreRender scorecard transform that changes the default font and color scheme for a scorecard.
NumberScalingTransform.cs Defines a PostQuery scorecard transform that applies B, M, and K scaling to large numbers.
ShowAnnotationDate.cs Defines a PreRender scorecard transform that shows the number of days since an annotation was last modified.
To install the sample scorecard transforms, you must build the sample assembly, register the assembly in the global assembly cache, and register the extensions in the PerformancePoint Services web.config file. These tasks require sufficient administrative permissions on the application server, which is the computer that is running PerformancePoint Services.
Instructions about how to install the complete sample are included with the sample files.
To install the sample scorecard transforms
Download the PerformancePoint Services SDK Reference Sample compressed (.zip) file, which includes the scorecard transform components.
Extract the contents to a folder on your computer.
Open the sample in Visual Studio.
In Solution Explorer, expand the References folder and restore any missing project references. PerformancePoint Services assemblies are installed to the global assembly cache only. Depending on your development environment, you may need to copy them to a different directory. For instructions about copying PerformancePoint Services assemblies from the global assembly cache, see PerformancePoint Services DLLs Used in Development Scenarios.
The sample includes references to the following PerformancePoint Services and SharePoint Server 2010 assemblies:
Build the sample assembly.
These instructions assume that you sign the assembly with the SDKSamples.snk file that is included in the sample. If you use a different strong name key file to generate a public key token for the assembly, replace the sample's public key token in these instructions (fa525c8383a44a52) with the actual key.
On the application server, add the sample assembly (Microsoft.PerformancePoint.SDK.Samples.dll) to the global assembly cache. For instructions, see How to: Install an Assembly into the Global Assembly Cache.
Navigate to the PerformancePoint Services web.config file in the default path C:\Program Files\Microsoft Office Servers\14.0\WebServices\PpsMonitoringServer on the application server.
As a best practice, make a copy of the web.config file before editing it.
Open the PerformancePoint Services web.config file in a text editor, such as NotePad.
To register the sample scorecard transforms, paste the following code into the CustomViewTransforms element.
<add key="AddColumn" value="Microsoft.PerformancePoint.SDK.Samples.ScorecardTransforms.PreQuery.AddColumnTransform, Microsoft.PerformancePoint.SDK.Samples, Version=220.127.116.11, Culture=neutral, PublicKeyToken=fa525c8383a44a52"/> <add key="NumberScaling" value="Microsoft.PerformancePoint.SDK.Samples.ScorecardTransforms.PostQuery.NumberScalingTransform, Microsoft.PerformancePoint.SDK.Samples, Version=18.104.22.168, Culture=neutral, PublicKeyToken=fa525c8383a44a52"/> <add key="ShowAnnotationDate" value="Microsoft.PerformancePoint.SDK.Samples.ScorecardTransforms.PreRender.ShowAnnotationDate, Microsoft.PerformancePoint.SDK.Samples, Version=22.214.171.124, Culture=neutral, PublicKeyToken=fa525c8383a44a52"/> <add key="FormattingTransform" value="Microsoft.PerformancePoint.SDK.Samples.ScorecardTransforms.PreRender.FormattingTransform, Microsoft.PerformancePoint.SDK.Samples, Version=126.96.36.199, Culture=neutral, PublicKeyToken=fa525c8383a44a52"/>
Save and then close the web.config file.
Depending on your environment, you may need to restart Internet Information Services (IIS).
After you install the sample scorecard transforms, they are applied to the scorecard views and Strategy Map reports on dashboards that you create and deploy from PerformancePoint Dashboard Designer. For more information about how to use Dashboard Designer, see the Office Web site.