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