bool PivotMoveDimToIndex(string mon, PivotMoveDimToArg tArg)
mon. Moniker for working with data slice dimension.
tArg. Parameters for moving dimension in header.
The PivotMoveDimToIndex operation moves dimension in header.
To execute the operation, in the mon field specify regular report instance moniker with the !DataArea!DataSources!<data source key>!DataSourceSlices!<slice key>!Pivot!PivotDims!<dimension key> postfix to work with data slice dimension, and in the tArg.index field specify index of the new position in header, to which the dimension should be moved.
The moniker can be obtained on executing the OpenPrxMeta operation. The dimensions list can be obtained using the GetPivotMetaData operation.
The operation returns True if dimension is moved successfully.
Below is the example of changing location of data source dimension. The request contains moniker for working with slice dimensions and index of the position in header, to which the dimension should be moved. The response contains whether the dimension is successfully moved.
{
"PivotMoveDimToIndex" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Pivot!PivotDims!991",
"tArg" :
{
"index" : "0"
}
}
}
{
"PivotMoveDimToIndexResult" : "1"
}
public static bool MoveDimInHeader(string moniker, ulong dataSourceKey, ulong sliceKey, ulong dimKey, long newPosIndex)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tMove = new PivotMoveDimToIndex()
{
tArg = new PivotMoveDimToArg()
{
index = newPosIndex
},
mon = moniker + "!DataArea!DataSources!" + dataSourceKey.ToString() + "!DataSourceSlices!" + sliceKey.ToString() + "!Pivot!PivotDims!" + dimKey.ToString()
};
//Move dimension in header
var result = somClient.PivotMoveDimToIndex(tMove);
return result;
}
See also: