Web Service > Web Service Operations > Working with Regular Reports > SetDataAreaCustomDim
bool SetDataAreaCustomDim(string mon, DataAreaSliceCustomDim tArg)
mon. Moniker for working with regular report analytical data area.
tArg. Custom hierarchy settings that should be applied.
The SetDataAreaCustomDim operation changes custom hierarchy of the analytical area slice dimension.
The operation allows for changing structure of the custom hierarchy that will be displayed instead of the source dimension. To execute the operation, in the mon field specify regular report instance moniker with the !DataArea postfix to work with analytical data area, and in the tArg field specify settings of the custom hierarchy that wll replace the source dimension. The moniker can be obtained on executing the OpenPrxMeta operation.
The operation results in the logical true if the custom hierarchy was changed successfully.
Below is the example of moving an element in the custom hierarchy. The request contains moniker for working with analytical data area, slice key, dimensions, and element moving parameters. The response contains whether a block is moved successfully.
{
"SetDataAreaCustomDim" :
{
"mon" : "CKBLCOMLGNPDGOAEOLMBENEEMJJPNLBEEJELMKJMFJMDPPKA!M!S!PJFDFHPMLGNPDGOAEIIKFLFJDIJHOCIHEOIELENPBPJCMFKEE!DataArea",
"tArg" :
{
"sliceKey" : "1",
"operation" : "Down",
"dim" :
{
"elems" :
{
"Item" :
{
"arg" :
{
"valueId" : "4",
"otherId" : "2"
}
}
},
"key" : "116"
}
}
}
}
{
"SetDataAreaCustomDimResult" : "1"
}
public static bool SetDataAreaCustomDim(string moniker, uint sliceKey, uint dimKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetDataAreaCustomDim()
{
tArg = new DataAreaSliceCustomDim()
{
sliceKey = sliceKey,
operation = CDOp.Down,
dim = new CustomDimension()
{
key = dimKey,
elems = new CDElement[]
{
new CDElement()
{
arg = new CDActionArg()
{
otherId = "2",
valueId = "4"
}
}
}
}
},
mon = moniker + "!DataArea"
};
// Move element in custom hierarchy
var result = somClient.SetDataAreaCustomDim(tSet);
return result;
}
See also: