Web Service > Web Service Operations > Working with Regular Reports > SetDataAreaVirtualSources
bool SetDataAreaVirtualSources(string mon, DataAreaVirtualSourcesArg tArg)
mon. Moniker to work with analytical data area source.
tArg. Operation execution parameters.
The SetDataAreaVirtualSources operation changes the virtual cube that is an analytical area data source.
The operation allows for changing settings of the virtual cube that is created from several data sources. To execute the operation, in the mon field specify moniker of opened regular report instance with the !DataArea!DataSources!source key postfix to work with data sources, and in the tArg field specify updated virtual cube settings that should be applied.
The moniker can be obtained on executing the OpenPrxMeta operation.
The operation returns True if the settings were changed successfully.
Below is the example of renaming the virtual cube that is a data source for regular report. The request contains moniker for working with data sources, source key, and new name. The response contains whether changes were applied successfully.
{
"SetDataAreaVirtualSources" :
{
"mon" : "EJGDNHFGAFODGOAEPGGDJLEMMFEACFBEGLGPIKOCPBNJCAEK!M!S!PHDNFLIFGAFODGOAELPAIPPCKGIOGDIDEPJKPBGFCDIIBHOPO!DataArea!DataSources!1",
"tArg" :
{
"virtualCubeInfo" :
{
"k" : "0",
"n" : "Combined sources"
}
}
}
}
{
"SetDataAreaVirtualSourcesResult" : "1"
}
public static bool ChangePrxVirtualDataSource(string moniker, uint dataSourceKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetDataAreaVirtualSources()
{
tArg = new DataAreaVirtualSourcesArg()
{
virtualCubeInfo = new ItEntityEx()
{
n = "Combined sources" // New name of virtual cube
}
},
mon = moniker + "!DataArea!DataSources!" + dataSourceKey
};
// Change virtual cube parameters
var result = somClient.SetDataAreaVirtualSources(tSet);
return result;
}
See also: