BIMonitoringServiceApplicationProxy.GetParameterDisplayData method

Gets the display data for a parameter.

Namespace:  Microsoft.PerformancePoint.Scorecards
Assembly:  Microsoft.PerformancePoint.Scorecards.ServerCommon (in Microsoft.PerformancePoint.Scorecards.ServerCommon.dll)

public DataTable GetParameterDisplayData(
	RepositoryLocation providerLocation,
	ParameterDefinition parameterDefinition,
	RepositoryLocation parameterSourceLocation,
	WebPartContext webPartContext
)

Parameters

providerLocation
Type: Microsoft.PerformancePoint.Scorecards.RepositoryLocation

The location of the filter provider in the repository.

parameterDefinition
Type: Microsoft.PerformancePoint.Scorecards.ParameterDefinition

The definition of the beginpoint.

parameterSourceLocation
Type: Microsoft.PerformancePoint.Scorecards.RepositoryLocation

The location of the parameter's data source in the repository.

webPartContext
Type: Microsoft.PerformancePoint.Scorecards.WebPartContext

The current state, inputs, and outputs of the Web Part.

Return value

Type: System.Data.DataTable
The display data for a parameter.

Implements

IBIMonitoringServiceApplicationProxy.GetParameterDisplayData(RepositoryLocation, ParameterDefinition, RepositoryLocation, WebPartContext)

Before updating a filter object in the repository, custom editors must call GetParameterDisplayData(RepositoryLocation, ParameterDefinition, RepositoryLocation, WebPartContext) at least once. This initializes the filter by running its query and retrieving data from the data source.

The following code example calls GetParameterDisplayData(RepositoryLocation, ParameterDefinition, RepositoryLocation, WebPartContext) to initialize a filter.

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 Set up a general development environment for SharePoint 2013.

  • Add the Microsoft.PerformancePoint.Scorecards.Client, Microsoft.PerformancePoint.Scorecards.ServerCommon, and Microsoft.SharePoint DLLs as references to your project. For more information about PerformancePoint Services DLLs, see PerformancePoint Services DLLs Used in Development Scenarios.

  • Add the following using directive to your class: using Microsoft.PerformancePoint.Scorecards;.

  • Paste the following code into the autogenerated class.

private static IBIMonitoringServiceApplicationProxy proxy;

// Get an instance of the service application proxy.
public IBIMonitoringServiceApplicationProxy Proxy
{
    get
    {
        if (null == proxy)
        {
            proxy = BIMonitoringServiceApplicationProxy.Default;
        }
        return proxy;
    }
}

// Initializes the ParameterDefinition.DisplayValues of each BeginPoint for the specified filter.
public void GetParameterDisplayData(ref Filter filter)
{
    if (null != filter)
    {
        if (null != filter.DataSourceLocation)
        {
            foreach (ParameterDefinition parameterDefinition in filter.BeginPoints)
            {
                DataTable dataTable = Proxy.GetParameterDisplayData(null, parameterDefinition,
                                                                               filter.DataSourceLocation, null);

                if (null != dataTable)
                {
                    parameterDefinition.DisplayValues = dataTable.Clone();
                    parameterDefinition.DisplayValues.Rows.Clear();
                }
            }
        }
    }
}
Show: