共用方式為


Overview of PerformancePoint Services Scorecard Transforms

In PerformancePoint Services in Microsoft SharePoint Server 2010, transforms are parameterized functions that change the appearance, contents, or functionality of scorecards. For example, PerformancePoint Services uses transforms to perform several operations before rendering a scorecard view, such as expanding named sets, computing rollups, and computing aggregations. These changes are applied at run time and they do not modify the definition of the scorecard object.

Applies to: SharePoint Server 2010

Note

If a transform modifies the data values in a scorecard, the changes propagate directly to Strategy Map reports that use the scorecard as a data source. In addition, changes to scorecards may affect KPI Details reports.

You can create custom transforms that can be applied to scorecards globally or based on a set of conditions. Global transforms are useful for setting default formatting options without modifying individual scorecards or the style sheet. Conditional transforms provide a powerful and flexible means of controlling scorecard content. For example, you can create a transform that runs on specific scorecards to change the background color of scorecard cells based on a condition such as the score or parent dimension.

Rendering Process

The three transform types are PreQuery, PostQuery, and PreRender.

Note

The scorecard transforms sample includes transforms that implement these transform types. For information about creating a transform based on sample transform, see How to: Create Scorecard Transforms for PerformancePoint Services.

The transform's type determines the point in the rendering process that the transform is applied, as shown in the following sequence:

  1. The scorecard's configured view definition is deserialized from the metadata repository and passed in to the system. This definition contains information about the data sources, key performance indicators (KPIs), page filters, row and column header trees, format settings, and transforms used by the scorecard.

  2. PreQuery transforms are applied.

  3. The query is constructed and run against the underlying data sources.

  4. Scorecard cells are created and populated with the query results.

  5. PostQuery transforms are applied.

  6. PreRender transforms are applied. Unlike PostQuery transforms, PreRender transforms are applied each time the scorecard view is rendered.

  7. The scorecard view is generated.

Note

Changes from a PreRender transform may not be shown when the scorecard view is rendered from the HTML cache. For more information, see Determining Which Transform Type to Use.

Transforms use the GenerateView or GenerateViewDirect method to get scorecard data. GenerateView consumes the scorecard definition directly from the repository but GenerateViewDirect enables you to pass in an ad hoc definition.

Note

The output of the GenerateView or GenerateViewDirect method is a well-formed object that can be used in visualizations other than scorecards or Strategy Map reports.

For more information about the run-time object for a scorecard view, see Architecture of the Scorecard Run-Time Object in PerformancePoint Services.

Determining Which Transform Type to Use

The functionality of your transform determines the transform type to use. The first determining factor is whether your transform requires values to be computed by the data source. If it does, use a PreQuery transform. PreQuery transforms are applied before the data source is queried, so changes that affect the query are computed by the data source. For example, if you use a PreQuery transform to add or replace a member, the value of the member is computed by the data source.

If your transform does not require the data source to compute values, the second determining factor is how often your transform must be applied. PostQuery and PreRender transforms differ according to their frequency, as follows:

  • PostQuery transforms are applied only when the GridViewData object (scorecard view) is generated. This transform type is useful when you want to apply the transform only when GridViewData is generated.

  • PreRender transforms are applied when the GridViewData object is generated, and they are also applied whenever the scorecard view is rendered (but the changes may not be shown if the scorecard view is rendered from the HTML cache).

All transform types are run when a GridViewData object is generated, but only PreRender transforms run when GridViewData is in a cached state. A GridViewData object is cached after it is generated for the first time or when one of its dependencies changes, such as the addition of a KPI to the scorecard. Visual changes that result from PreRender transforms (such as adding a column) are always rendered during temporary navigation operations such as sorting, filtering, and changing the rollup type in the toolbar. However, if the server retrieves content from the HTML cache to render a scorecard view, the visual changes are not rendered unless the changes are saved to the HTML cache.

Note

This process may render scorecard views inconsistently. One workaround is to use your PreRender transform to set the GridViewData.LastAnnotationUpdatedOn property to use the current date and time. This forces a bypass of the HTML cache when rendering the scorecard view.

The following table describes examples of the types of transforms that are implemented by PerformancePoint Services. Use this information to help you determine which type of transform to use.

Table 1. Native implementations of PreQuery, PostQuery, and PreRender transforms

Transform

Description

PreQuery

The UpdateDisplayText transform updates the display text for scorecard and KPI headers that have the GridHeaderItem.UseLinkedElementDisplayText property set to true.
The ExpandNamedSets transform translates formulas (such as <Member>.Children) into the actual members to query for.

PostQuery

The AnnotationTransform transform retrieves annotations for each cell.

PreRender

The ComputeAggregations transform computes aggregations for objective KPIs based on the values of its child KPIs.
The ComputeRollups transform computes rollup values for objective KPIs based on the scores of its child KPIs.

See Also

Tasks

How to: Create Scorecard Transforms for PerformancePoint Services

Other Resources

PerformancePoint Services Scorecards

Code Samples for PerformancePoint Services in SharePoint Server 2010