bool SetPivotHeaderMetaData(string mon, PivotHeader tArg)
mon. Moniker for working with data slice header.
tArg. Parameters that should be applied for slice header.
The SetPivotHeaderMetaData operation changes data slice header settings.
To execute the operation, in the mon field specify moniker of regular report instance with the !DataArea!DataSources!<source key>!DataSourceSlices!<slice key>!Pivot! postfix.
This moniker should also be appended with one of the following values:
TopHeader - to work with columns header.
LeftHeader - to work with rows header.
The moniker can be obtained on executing the OpenPrxMeta operation.
In the tArg field specify the settings that should be applied for header.
The operation returns True if the settings were applied successfully.
Below is the example of changing columns header settings of data slice. The request contains moniker for working with header settings and parameters to be changed. The response contains whether changes are applied successfully.
{
"SetPivotHeaderMetaData" :
{
"mon" : "FCJKECDEBBGOFOAENKBHCHAOHGPDFHHEPJAKMBIGJNLFCJOB!M!S!PLHCGKDDEBBGOFOAENCPCGCHBJGOFDLNEIJMPDIHNAGKFLNGA!DataArea!DataSources!1!DataSourceSlices!1!Pivot!TopHeader",
"tArg" :
{
"separated" : "1"
}
}
}
{
"SetPivotHeaderMetaDataResult" : "1"
}
public static bool SetPivotHeaderMeta(string moniker, uint dataSourceKey, uint sliceKey)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetPivotHeaderMetaData()
{
tArg = new PivotHeader()
{
separated = 1
},
mon = moniker + "!DataArea!DataSources!" + dataSourceKey.ToString() + "!DataSourceSlices!" + sliceKey.ToString() + "!Pivot!TopHeader"
};
//Change header settings
var result = somClient.SetPivotHeaderMetaData(tSet);
return result;
}
See also: