PrxMetaResult OpenPrxMeta(OdId tObject, OpenPrxMetaArg tArg)
tObject. Moniker of the repository object that is regular report.
tArg. Operation execution parameters.
The OpenPrxMeta operation opens regular report and allows access to work with its metadata.
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.
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.
{
"OpenPrxMeta" :
{
"tObject" :
{
"id" : "S1!M!177486"
},
"tArg" :
{
"args" :
{
"openForEdit" : "true"
}
}
}
}
{
"OpenPrxMetaResult" :
{
"id" :
{
"id" : "S1!M!S!P1"
}
}
}
public static PrxMetaResult OpenMetaPrx(MbId mb, string prxId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenPrxMeta()
{
tArg = new OpenPrxMetaArg()
{
args = new PrxMetaOpenArgs() { openForEdit = true }
},
//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: