GetEaxPivotJson

Syntax

string GetEaxPivotJson(EaxId tEax, PivotJson tArg)

Parameters

tEax. Moniker of opened express report instance.

tArg. Operation execution parameters.

Description

The GetEaxPivotJson operation gets JSON view of express report table elements.

Comments

To execute the operation, in the tEax field specify moniker of opened express report instance, and in the tArg field specify JSON view creation parameters. The moniker can be obtained after executing the OpenEax operation.

The operation results in a string with the obtained JSON view of table elements.

Example

Below is the example of getting JSON view of express report table elements.

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">
<GetEaxPivotJson xmlns="http://www.fsight.ru/PP.SOM.Som">
<tEax xmlns="">
  <id>CNEJBLJFFPJPFOAENJKOCMNODGGKOPNECKGKNFDEELFBPCOD!M!S!EMIBJLOJFFPJPFOAEBHBAAPJMCFCCKOAEELHMJNJGPCFHCKPA</id>
  </tEax>
<tArg xmlns="">
  <topHeader>true</topHeader>
  <leftHeader>true</leftHeader>
<cells>
  <ev>false</ev>
  </cells>
  </tArg>
  </GetEaxPivotJson>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <GetEaxPivotJsonResult 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">{"topHeader":{"slots":[{"dimKey":112,"elements":[{"name":"2000","level":0},{"name":"2001","level":0},{"name":"2002","level":0},{"name":"2003","level":0}]}]},"leftHeader":{"slots":[{"dimKey":208,"elements":[{"name":"Germany","level":0},{"name":"France","level":0}]}]},"cells":[{"row":0,"col":0,"value":2.315848008368527},{"row":0,"col":1,"value":2.0709973516171365},{"row":0,"col":2,"value":1.8465508876605656},{"row":0,"col":3,"value":1.528585055550339},{"row":1,"col":0,"value":1.6321462148570773},{"row":1,"col":1,"value":1.836188412473067},{"row":1,"col":2,"value":1.5811356838395203},{"row":1,"col":3,"value":1.656376233638213}]}</GetEaxPivotJsonResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
 "GetEaxPivotJson" :
  {
   "tEax" :
    {
     "id" : "CNEJBLJFFPJPFOAENJKOCMNODGGKOPNECKGKNFDEELFBPCOD!M!S!EMIBJLOJFFPJPFOAEBHBAAPJMCFCCKOAEELHMJNJGPCFHCKPA"
    },
   "tArg" :
    {
     "topHeader" : "true",
     "leftHeader" : "true",
     "cells" :
      {
       "ev" : "false"
      }
    }
  }
}

JSON response:

{
 "GetEaxPivotJsonResult" : "{"topHeader":{"slots":[{"dimKey":112,"elements":[{"name":"2000","level":0},{"name":"2001","level":0},
{"name":"2002","level":0},{"name":"2003","level":0}]}]},"leftHeader":{"slots":[{"dimKey":208,"elements":[{"name":"Germany","level":0},
{"name":"France","level":0}]}]},"cells":[{"row":0,"col":0,"value":2.315848008368527},{"row":0,"col":1,"value":2.0709973516171365},
{"row":0,"col":2,"value":1.8465508876605656},{"row":0,"col":3,"value":1.528585055550339},{"row":1,"col":0,"value":1.6321462148570773},
{"row":1,"col":1,"value":1.836188412473067},{"row":1,"col":2,"value":1.5811356838395203},{"row":1,"col":3,"value":1.656376233638213}]}"
}
public static string GetEaxPivotJson(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetEaxPivotJson()
{
tArg = new PivotJson()
{
leftHeader = true,
topHeader = true,
cells = new PivotJsonCells()
{
ev = false
}
},
tEax = new EaxId() { id = moniker }
};
// Get JSON view
var result = somClient.GetEaxPivotJson(tGet);
return result;
}

See also:

Working with Express Reports