bool SetPivotFilterMetaData(string mon, PivotFilter tArg)
mon. Moniker for working with data slice filtering settings.
tArg. Parameters for changing data filtering settings.
The SetPivotFilterMetaData operation changes data filtering settings specified for data slice.
To execute the operation, in the mon field specify moniker of regular report instance with the !DataArea!DataSources!<source key>!DataSourceSlices!<slice key>!Pivot!Filter postfix, and in the tArg field specify filtering parameters that should be applied.
The moniker can be obtained on executing the OpenPrxMeta operation.
The operation returns True if changes are applied successfully.
Below is the example for changing data filtering settings. The request contains moniker for working with filtering settings and changeable filtering parameters. The response contains whether changes are applied successfully.
{
"SetPivotFilterMetaData" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Pivot!Filter",
"tArg" :
{
"enabled" : "true",
"suppressEmptyCells" : "true"
}
}
}
{
"SetPivotFilterMetaDataResult" : "1"
}
public static bool SetPivotFilter(string moniker, uint dataSourceKey, uint sliceKey)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetPivotFilterMetaData()
{
tArg = new PivotFilter()
{
enabled = true,
suppressEmptyCells = true
},
mon = moniker + "!DataArea!DataSources!" + dataSourceKey.ToString() + "!DataSourceSlices!" + sliceKey.ToString() + "!Pivot!Filter"
};
//Change data filter settings
var result = somClient.SetPivotFilterMetaData(tSet);
return result;
}
See also: