Below is the example of using the OpenPrx operation to open a 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 the opened regular report instance moniker. Any additional data is not obtained.
The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier section. The result of the operation is the result of the function.
{
"OpenPrx" :
{
"tObject" :
{
"id" : "S1!M!6334"
},
"tArg" :
{
"args" :
{
"openForEdit" : "true"
}
}
}
}
{
"OpenPrxResult" :
{
"id" :
{
"id" : "S1!M!S!P2"
}
}
}
public static OpenPrxResult OpenPrxForEdit(MbId mb, string prxId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Find repository object
var prxObj = FindObjectById(mb, prxId);
//Operation execution parameters
var tOpen = new OpenPrx()
{
tArg = new OpenPrxArg()
{
args = new PrxOpenArgs()
{
openForEdit = true
}
},
//Create object moniker
tObject = new OdId() { id = mb.id + "!" + prxObj.k }
};
//Open regular report
var result = somClient.OpenPrx(tOpen);
return result;
}
See also: