PrxMetaSheetsAdd

Syntax

OpItemKey PrxMetaSheetsAdd(string mon, PrxMetaSheetsAddArg tArg)

Parameters

mon. Moniker for working with regular report sheets.

tArg. Operation execution parameters.

Description

The PrxMetaSheetsAdd operation adds a new sheet to regular report.

Comments

To execute the operation, in the mon field specify regular report instance moniker with the !Sheets postfix to work with sheets, and in the tArg field specify parameters of added sheet.

The moniker can be obtained on executing the OpenPrxMeta operation.

The operation results in the key of added sheet.

Example

Below is the example of adding a sheet to regular report. The request contains moniker for working with sheets and a type of added sheet. The response contains the key of created sheet.

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">
<PrxMetaSheetsAdd xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">S1!M!S!P1!Sheets</mon>
<tArg xmlns="">
  <n>New sheet</n>
  <type>Table</type>
  </tArg>
  </PrxMetaSheetsAdd>
  </s:Body>
  </s:Envelope>

SOAP response:

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

JSON request:

{
"PrxMetaSheetsAdd" :
{
"mon" : "S1!M!S!P1!Sheets",
"tArg" :
{
"n" : "New sheet",
"type" : "Table"
}
}
}

JSON response:

{
"PrxMetaSheetsAddResult" :
{
"k" : "2"
}
}
public static OpItemKey AddPrxSheet(string moniker, string sheetName)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tAdd = new PrxMetaSheetsAdd()
{
tArg = new PrxMetaSheetsAddArg()
{
type = PrxSheetType.Table,
n = sheetName
},
mon = moniker + "!Sheets"
};
//Add a new sheet
var result = somClient.PrxMetaSheetsAdd(tAdd);
return result;
}

See also:

Working with Regular Reports