PvtTotals GetPivotEvaluatorTotalsMetaData(string mon, PvtTotals tArg)
mon. Moniker for working with totals.
tArg. Parameters for getting information about totals.
The GetPivotEvaluatorTotalsMetaData operation gets total calculation options.
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 obtained settings.
The moniker can be obtained on executing the OpenPrxMeta operation.
In the tArg field specify empty values or default values for the fields, which values should be obtained. Specify one element for collections. To get information about a specific element, specify its key in metadata. If -1 is specified as a key value, information about all elements of this type is obtained.
Below is the example of getting totals settings. The request contains moniker for working with totals and a list of settings, which values should be obtained. The response contains the obtained settings values.
{
"GetPivotEvaluatorTotalsMetaData" :
{
"mon" : "HAPIEIKAGHBPFOAEGECNPBJBABIFDABEOKMMJKOHAOBCEPLN!M!S!PLMNJPALAGHBPFOAENFAIOMEDPPLOKFNEKKJAEHOAOHCPFIIC!DataArea!DataSources!1!DataSourceSlices!1!Pivot!Totals",
"tArg" :
{
"treatEmptyAsZero" : "false",
"includeOwner" : "false",
"columnTypes" :
{
"t" : "None"
},
"enabled" : "false",
"columnSettings" :
{
"namingMode" : "Source",
"totalsNameSeparator" : "",
"hierarchyTotal" : "false",
"overallTotal" : "false",
"insteadOwnerTotalsType" : "None"
}
}
}
}
{
"GetPivotEvaluatorTotalsMetaDataResult" :
{
"treatEmptyAsZero" : "1",
"includeOwner" : "1",
"columnTypes" :
{
"t" : "Sum"
},
"enabled" : "1",
"columnSettings" :
{
"namingMode" : "Combined",
"totalsNameSeparator" : "-",
"hierarchyTotal" : "1",
"overallTotal" : "1",
"insteadOwnerTotalsType" : "Sum"
}
}
}
public static PvtTotals GetPivotEvaluatorTotalsMetaData(string moniker, uint dataSourceKey, uint sliceKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetPivotEvaluatorTotalsMetaData()
{
tArg = new PvtTotals()
{
enabled = new bool(),
columnTypes = new PvtEvaluatorElementType[1],
columnSettings = new PvtEvaluatorTotalsSettings()
{
hierarchyTotal = new bool(),
insteadOwnerTotalsType = new PvtEvaluatorElementType(),
namingMode = new PvtTotalParentNamingMode(),
overallTotal = new bool(),
totalsNameSeparator = ""
},
includeOwner = new bool(),
treatEmptyAsZero = new bool()
},
mon = moniker + "!DataArea!DataSources!" + dataSourceKey.ToString() + "!DataSourceSlices!" + sliceKey.ToString() + "!Pivot!Totals"
};
// Get totals calculation settings
var result = somClient.GetPivotEvaluatorTotalsMetaData(tGet);
return result;
}
See also: