OpItemKey DataAreaSlicesAdd(string mon, DataAreaSlicesAddArg tArg)
mon. Moniker for working with data source slices.
tArg. Parameters for creating a new data slice.
The DataAreaSlicesAdd operation creates a new data slice for data source of analytical data area.
To execute the operation, in the mon field specify regular report instance moniker with the !DataArea!DataSources!<data source key>!DataSourceSlices postfix to work with data source slices, and in the tArg.type field specify the type of created data slice.
The moniker can be obtained on executing the OpenPrxMeta operation.
The operation results in the key of the created data slice.
Below is the example of creating a new data slice for data source. The request contains moniker for working with data slices and the type of created slice. The response contains key of the created data slice.
{
"DataAreaSlicesAdd" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices",
"tArg" :
{
"type" : "Pivot"
}
}
}
{
"DataAreaSlicesAddResult" :
{
"k" : "3"
}
}
public static OpItemKey AddSlice(string moniker, uint dataSourceKey)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tAdd = new DataAreaSlicesAdd()
{
tArg = new DataAreaSlicesAddArg()
{
type = EaxDataAreaSliceType.Pivot
},
mon = moniker + "!DataArea!DataSources!" + dataSourceKey.ToString() + "!DataSourceSlices"
};
//Add a slice for data source
var result = somClient.DataAreaSlicesAdd(tAdd);
return result;
}
See also: