SetPivotMetaData

Syntax

bool SetPivotMetaData(string mon, PivotMetaData tArg)

Parameters

mon. Moniker for working with base of data slice.

tArg. Parameters for changing base of data slice.

Description

The SetPivotMetaData operation changes base of data slice.

Comments

The operation changes various settings that affect creating a slice and getting data. To execute the operation, in the mon field specify regular report instance moniker with the !DataArea!DataSources!<data source key>!DataSourceSlices!<slice key>!Pivot postfix to work with slice base, and in the tArg field specify new settings.

The moniker can be obtained on executing the OpenPrxMeta operation.

The operation returns True if settings are changed successfully.

Example

Below is the example of changing data slice base. The request contains moniker for working with data slice base and parameters to be changed. The response indicates 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">
<SetPivotMetaData xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Pivot</mon>
<tArg xmlns="">
<dims>
<its>
<it>
  <k>5858</k>
  <index>0</index>
  </it>
  </its>
  </dims>
  </tArg>
  </SetPivotMetaData>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetPivotMetaDataResult 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</SetPivotMetaDataResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetPivotMetaData" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Pivot",
"tArg" :
{
"dims" :
{
"its" :
{
"it" :
[
{
"k" : "5858",
"index" : "0"
}
]
}
}
}
}
}

JSON response:

{
"SetPivotMetaDataResult" : "1"
}
public static bool ChangePivotInfo(string moniker, ulong dataSourceKey, ulong sliceKey, ulong dimKey)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetPivotMetaData()
{
tArg = new PivotMetaData()
{
dims = new PivotDimensions()
{
its = new PivotDimension[1]
{
new PivotDimension()
{
k = dimKey,
index = 0
}
}
}
},
mon = moniker + "!DataArea!DataSources!" + dataSourceKey.ToString() + "!DataSourceSlices!" + sliceKey.ToString() + "!Pivot"
};
//Change information about slice base
var result = somClient.SetPivotMetaData(tSet);
return result;
}

See also:

Working with Regular Reports