OpenPrxMeta

Syntax

PrxMetaResult OpenPrxMeta(OdId tObject, OpenPrxMetaArg tArg)

Parameters

tObject. Moniker of the repository object that is regular report.

tArg. Operation execution parameters.

Description

The OpenPrxMeta operation opens regular report and allows access to work with its metadata.

Comments

To execute the operation, in the tObject field specify moniker of the object that is regular report, and in the tArg field specify opening parameters. The object moniker can be obtained on executing the GetObjects operation. The tArg.args field can be used to specify report opening mode (view or edit) and values of parameters that will be sent to parametric data sources. The tArg.meta field can be used to specify metadata that should be obtained on operation execution. Set the fields that should be obtained. It is required to specify default values for the fields. To get collections of some objects, request at least object keys and specify -1 as a key value. The operation results in the moniker of opened regular report instance and metadata if the fields were defined in tArg.meta.

Further work with the opened report is executed using the operations: GetPrxMeta, SetPrxMeta, PrxMetaReportRecalc, PrxMetaReportExport.

To work with report sheets, use the operations: PrxMetaSheetsAdd, PrxMetaSheetsDelete, PrxMetaSheetsMove, PrxMetaSheetsDuplicate.

To work with controls, use the operations: PrxMetaControlsAdd, PrxMetaControlsDelete, PrxMetaControlsMove.

To work with visualizers, use the operations: PrxMetaViewsAdd, DataAreaViewsDelete.

To work with analytical data areas, use the operations: GetDataAreaSources, SetDataAreaSources, DataAreaSourcesAdd, DataAreaSourcesDelete, DataAreaSlicesAdd, DataAreaSlicesDelete.

To work with a base for data slice, use the operations: GetPivotMetaData, SetPivotMetaData, PivotChangeDimHeader, PivotMoveDimToIndex.

To close the opened regular report instance, use the ClosePrxMeta operation.

Example

Below is the example of opening regular report for edit. The request contains moniker of the object that is a regular report and a flag indicating whether the report must be opened for edit. The response contains moniker of the opened regular report instance.

The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.

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">
<OpenPrxMeta xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>S1!M!177486</id>
  </tObject>
<tArg xmlns="">
<args>
  <openForEdit>true</openForEdit>
  </args>
  </tArg>
  </OpenPrxMeta>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OpenPrxMetaResult 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">
<id xmlns="">
  <id>S1!M!S!P1</id>
  </id>
  </OpenPrxMetaResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"OpenPrxMeta" :
{
"tObject" :
{
"id" : "S1!M!177486"
},
"tArg" :
{
"args" :
{
"openForEdit" : "true"
}
}
}
}

JSON response:

{
"OpenPrxMetaResult" :
{
"id" :
{
"id" : "S1!M!S!P1"
}
}
}
public static PrxMetaResult OpenMetaPrx(MbId mb, string prxId, bool forEdit = true )
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenPrxMeta()
{
tArg = new OpenPrxMetaArg()
{
args = new PrxMetaOpenArgs() { openForEdit = forEdit }
},
//Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, prxId).k }
};
//Open regular report
var result = somClient.OpenPrxMeta(tOpen);
return result;
}

See also:

Working With Regular Reports