Show contents 

Web Service > Web Service Operations > Working with Regular Reports > SetDataAreaCustomDim

SetDataAreaCustomDim

Syntax

bool SetDataAreaCustomDim(string mon, DataAreaSliceCustomDim tArg)

Parameters

mon. Moniker for working with regular report analytical data area.

tArg. Custom hierarchy settings that should be applied.

Description

The SetDataAreaCustomDim operation changes custom hierarchy of the analytical area slice dimension.

Comments

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.

Example

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.

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">
<SetDataAreaCustomDim xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">CKBLCOMLGNPDGOAEOLMBENEEMJJPNLBEEJELMKJMFJMDPPKA!M!S!PJFDFHPMLGNPDGOAEIIKFLFJDIJHOCIHEOIELENPBPJCMFKEE!DataArea</mon>
<tArg xmlns="">
  <sliceKey>1</sliceKey>
  <operation>Down</operation>
<dim>
<elems>
<Item>
<arg>
  <valueId>4</valueId>
  <otherId>2</otherId>
  </arg>
  </Item>
  </elems>
  <key>116</key>
  </dim>
  </tArg>
  </SetDataAreaCustomDim>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"SetDataAreaCustomDim" :
{
"mon" : "CKBLCOMLGNPDGOAEOLMBENEEMJJPNLBEEJELMKJMFJMDPPKA!M!S!PJFDFHPMLGNPDGOAEIIKFLFJDIJHOCIHEOIELENPBPJCMFKEE!DataArea",
"tArg" :
{
"sliceKey" : "1",
"operation" : "Down",
"dim" :
{
"elems" :
{
"Item" :
{
"arg" :
{
"valueId" : "4",
"otherId" : "2"
}
}
},
"key" : "116"
}
}
}
}

JSON response:

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

Working with Regular Reports