Show contents 

Web Service > Web Service Operations > Working with Regular Reports > SetDataAreaVirtualSources

SetDataAreaVirtualSources

Syntax

bool SetDataAreaVirtualSources(string mon, DataAreaVirtualSourcesArg tArg)

Parameters

mon. Moniker to work with analytical data area source.

tArg. Operation execution parameters.

Description

The SetDataAreaVirtualSources operation changes the virtual cube that is an analytical area data source.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetDataAreaVirtualSources xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">EJGDNHFGAFODGOAEPGGDJLEMMFEACFBEGLGPIKOCPBNJCAEK!M!S!PHDNFLIFGAFODGOAELPAIPPCKGIOGDIDEPJKPBGFCDIIBHOPO!DataArea!DataSources!1</mon>
<tArg xmlns="">
<virtualCubeInfo>
  <k>0</k>
  <n>Combined sources</n>
  </virtualCubeInfo>
  </tArg>
  </SetDataAreaVirtualSources>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetDataAreaVirtualSourcesResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</SetDataAreaVirtualSourcesResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetDataAreaVirtualSources" :
{
"mon" : "EJGDNHFGAFODGOAEPGGDJLEMMFEACFBEGLGPIKOCPBNJCAEK!M!S!PHDNFLIFGAFODGOAELPAIPPCKGIOGDIDEPJKPBGFCDIIBHOPO!DataArea!DataSources!1",
"tArg" :
{
"virtualCubeInfo" :
{
"k" : "0",
"n" : "Combined sources"
}
}
}
}

JSON response:

{
"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:

Working with Regular Reports