bool SetPivotMetaData(string mon, PivotMetaData tArg)
mon. Moniker for working with base of data slice.
tArg. Parameters for changing base of data slice.
The SetPivotMetaData operation changes base of data slice.
The operation changes various settings that affect creating a slice and getting data. 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 to work with a 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 the settings were changed successfully.
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 contains whether changes are applied successfully.
{
"SetPivotMetaData" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Pivot",
"tArg" :
{
"dims" :
{
"its" :
{
"it" :
[
{
"k" : "5858",
"index" : "0"
}
]
}
}
}
}
}
{
"SetPivotMetaDataResult" : "1"
}
public static bool ChangePivotInfo(string moniker, uint dataSourceKey, uint sliceKey, uint 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: