bool SetPivotDimElementTotal(string mon, PivotDimElementTotal tArg)
mon. Moniker for working with totals.
tArg. Operation execution parameters.
The SetPivotDimElementTotal operation changes own total type calculation settings for a dimension element.
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.
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.
{
"SetPivotDimElementTotal" :
{
"mon" : "IGKCBLACHJHFGOAECPFHIBAHKDNEEELENJKICJHOLDFGIJAG!M!S!PPMAJAPACHJHFGOAEPIAFFPEFHCEHPGKELLHHEFOLEHCDAEHK!DataArea!DataSources!1!DataSourceSlices!1!Pivot!Totals",
"tArg" :
{
"elementKey" :
{
"key" : "1"
},
"dimKey" : "116",
"type" : "Avg",
"enabled" : "true"
}
}
}
{
"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: