SetPrxMeta

Syntax

bool SetPrxMeta(string mon, PrxMetaArg tArg)

Parameters

mon. Moniker of opened regular report instance.

tArg. Operation execution parameters.

Description

The SetPrxMeta operation changes regular report metadata.

Comments

The operation changes settings of various regular report elements. To execute the operation, in the mon field specify moniker of opened regular report instance, and in the tArg field specify the fields, which values should be changed.

The moniker can be obtained on executing the OpenPrxMeta operation. The regular report should be opened for edit.

In the tArg.meta field specify the fields, which should be changed. The elements, which should be changed, must have the key (the k field) defined.

The operation returns True if changes were applied successfully.

To save changes, use the SaveObject or SaveObjectAs operations.

Example

Below is the example of renaming regular report sheet. The request contains moniker of opened regular report instance, sheet key, and a new sheet name. The response contains whether changes are 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">
<SetPrxMeta xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">S1!M!S!P1</mon>
<tArg xmlns="">
<meta>
<sheets>
<its>
<it>
  <k>1</k>
  <n>Data</n>
  </it>
  </its>
  </sheets>
  </meta>
  </tArg>
  </SetPrxMeta>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetPrxMetaResult 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</SetPrxMetaResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetPrxMeta" :
{
"mon" : "S1!M!S!P1",
"tArg" :
{
"meta" :
{
"sheets" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"n" : "Data"
}
]
}
}
}
}
}
}

JSON response:

{
"SetPrxMetaResult" : "1"
}
public static bool SetPrxSheets(string moniker, string newSheetName)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetPrxMeta()
{
tArg = new PrxMetaArg()
{
meta = new PrxMetaData()
{
sheets = new PrxMetaSheets()
{
its = new PrxMetaSheet[1]
{
new PrxMetaSheet() { k = 1, n = newSheetName }
}
}
}
},
mon = moniker
};
//Change sheet parameters
var result = somClient.SetPrxMeta(tSet);
return result;
}

See also:

Working With Regular Reports