SetPivotDimElementTotal

Syntax

bool SetPivotDimElementTotal(string mon, PivotDimElementTotal tArg)

Parameters

mon. Moniker for working with totals.

tArg. Operation execution parameters.

Description

The SetPivotDimElementTotal operation changes own total type calculation settings for a dimension element.

Comments

To execute the operation, in the mon field specify moniker of regular report instance with the !DataArea!DataSources!source key!DataSourceSlices!slice key!Pivot!Totals postfix to work with totals, and in the tArg field specify own total type calculation settings for a dimension element. The moniker can be obtained on executing the OpenPrxMeta operation.

The operation results in the logical True if the settings were changed successfully.

Example

Below is the example of changing own total type calculation settings for a dimension element. The request contains moniker for working with totals, dimension key, element key, and calculated total type. The response contains whether total type calculation settings are successfully changed.

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">
<SetPivotDimElementTotal xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">IGKCBLACHJHFGOAECPFHIBAHKDNEEELENJKICJHOLDFGIJAG!M!S!PPMAJAPACHJHFGOAEPIAFFPEFHCEHPGKELLHHEFOLEHCDAEHK!DataArea!DataSources!1!DataSourceSlices!1!Pivot!Totals</mon>
<tArg xmlns="">
<elementKey>
  <key>1</key>
  </elementKey>
  <dimKey>116</dimKey>
  <type>Avg</type>
  <enabled>true</enabled>
  </tArg>
  </SetPivotDimElementTotal>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"SetPivotDimElementTotal" :
{
"mon" : "IGKCBLACHJHFGOAECPFHIBAHKDNEEELENJKICJHOLDFGIJAG!M!S!PPMAJAPACHJHFGOAEPIAFFPEFHCEHPGKELLHHEFOLEHCDAEHK!DataArea!DataSources!1!DataSourceSlices!1!Pivot!Totals",
"tArg" :
{
"elementKey" :
{
"key" : "1"
},
"dimKey" : "116",
"type" : "Avg",
"enabled" : "true"
}
}
}

JSON response:

{
"SetPivotDimElementTotalResult" : "1"
}
public static bool SetPivotDimElementTotal(string moniker, uint dataSourceKey, uint sliceKey, uint dimKey, string elementIndex)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetPivotDimElementTotal()
{
tArg = new PivotDimElementTotal()
{
dimKey = dimKey,
elementKey = new ElKey(){ key = elementIndex },
enabled = true,
type = PvtEvaluatorElementType.Avg
},
mon = moniker + "!DataArea!DataSources!" + dataSourceKey + "!DataSourceSlices!" + sliceKey + "!Pivot!Totals"
};
// Change own total type calculation settings for a dimension element
var result = somClient.SetPivotDimElementTotal(tSet);
return result;
}

See also:

Working with Regular Reports