SetPivotFilterMetaData

Syntax

bool SetPivotFilterMetaData(string mon, PivotFilter tArg)

Parameters

mon. Moniker for working with data slice filtering settings.

tArg. Parameters for changing data filtering settings.

Description

The SetPivotFilterMetaData operation changes data filtering settings specified for data slice.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetPivotFilterMetaData xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Pivot!Filter</mon>
<tArg xmlns="">
  <enabled>true</enabled>
  <suppressEmptyCells>true</suppressEmptyCells>
  </tArg>
  </SetPivotFilterMetaData>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetPivotFilterMetaDataResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</SetPivotFilterMetaDataResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetPivotFilterMetaData" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Pivot!Filter",
"tArg" :
{
"enabled" : "true",
"suppressEmptyCells" : "true"
}
}
}

JSON response:

{
"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:

Working With Regular Reports