Opening Regular Report

Below is the example of using the OpenPrx operation to open a regular report. The request contains moniker of the object that is a regular report. The response contains the opened 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.

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

SOAP response:

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

JSON request:

{
"OpenPrx" :
{
"tObject" :
{
"id" : "S1!M!6334"
},
"tArg" :
{
"args" : ""
}
}
}

JSON response:

{
"OpenPrxResult" :
{
"id" :
{
"id" : "S1!M!S!P1"
}
}
}
public static OpenPrxResult OpenPrx(MbId mb, string prxId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenPrx()
{
tArg = new OpenPrxArg()
{
args = new PrxOpenArgs()
},
//Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, prxId).k }
};
//Open regular report
var result = somClient.OpenPrx(tOpen);
return result;
}

See also:

OpenPrx