PivotHeaderFilter SetPivotHeaderFilterMetaData(string mon, PivotHeaderFilter tArg)
mon. Moniker for working with data slice header filter.
tArg. Parameters for changing filtering settings.
The SetPivotHeaderFilterMetaData operation changes filtering settings for data slice header.
To execute the operation, in the mon field specify moniker of regular report instance with the !DataArea!DataSources!<source key>!DataSourceSlices!<slice key>!Pivot! postfix. This moniker should also be appended with one of the following values:
TopHeade!HeaderSettings!Filter - to work with columns header filter
LeftHeader!HeaderSettings!Filter - to work with rows header filter.
The moniker can be obtained on executing the OpenPrxMeta operation.
In the tArg field specify filtering parameters that should be applied.
The operation returns True if changes are applied successfully.
Below is the example of changing filtering settings in data slice columns header. The request contains moniker for working with header filtering settings and filtering parameters to be changed. The response contains whether changes are applied successfully.
{
"SetPivotHeaderFilterMetaData" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Pivot!TopHeader!HeaderSettings!Filter",
"tArg" :
{
"enabled" : "true",
"suppressEmptyCells" : "true"
}
}
}
{
"SetPivotHeaderFilterMetaDataResult" : "1"
}
public static bool SetPivotHeaderFilter(string moniker, uint dataSourceKey, uint sliceKey)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetPivotHeaderFilterMetaData()
{
tArg = new PivotHeaderFilter()
{
enabled = true,
suppressEmptyCells = true
},
mon = moniker + "!DataArea!DataSources!" + dataSourceKey.ToString() + "!DataSourceSlices!" + sliceKey.ToString() + "!Pivot!TopHeader!HeaderSettings!Filter"
};
//Change header filter settings
var result = somClient.SetPivotHeaderFilterMetaData(tSet);
return result;
}
See also: