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 regular report instance moniker with the !DataArea!DataSources!<data 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 determine settings that should be applied to header. The operation returns True if settings are 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 indicates whether changes are applied successfully.
{
"SetPivotHeaderMetaData" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Pivot!TopHeader",
"tArg" :
{
"separated" : "1"
}
}
}
{
"SetPivotHeaderMetaDataResult" : "1"
}
public static bool SetPivotHeaderMeta(string moniker, ulong dataSourceKey, ulong 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: