Getting Formatting Styles for Various Table Elements

Below is the example of using the GetEaxMd operation to get formatting styles defined for various table elements. The request contains moniker of opened express report instance and the pattern indicating whether style parameters for all the elements must be obtained. The response contains formatting styles parameters.

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">
<GetEaxMd xmlns="http://www.fsight.ru/PP.SOM.Som">
<tEax xmlns=" ">
  <id>S1!M!S!E1</id>
  </tEax>
<tArg xmlns=" ">
<pattern>
  <obInst>false</obInst>
<gridStyle>
<parts>
  <it>FixedCorner</it>
  <it>TopHeader</it>
  <it>LeftHeader</it>
  </parts>
<ops>
<it>
  <Key>InternalFormatConditions</Key>
  <Value>Get</Value>
  </it>
  </ops>
  </gridStyle>
  </pattern>
  </tArg>
  </GetEaxMd>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetEaxMdResult 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!E1</id>
  </id>
<meta xmlns=" ">
<grid>
<style>
<fixedCorner>
  <Text HA="-1" VA="1" WW="1" M="7.56 5.67 7.56 5.67" />
  <NumberFormat F="" FT="0" />
  <Font F="Calibri" S="9" C="#000000" A="0" B="true" />
  <Borders />
  <Hyperlink />
  </fixedCorner>
<topHeader>
  <Text HA="2" VA="1" WW="1" M="7.56 5.67 7.56 5.67" />
  <NumberFormat F="" FT="0" />
  <Font F="Calibri" S="9" C="#000000" A="0" B="true" />
  <Borders />
  <Hyperlink />
  </topHeader>
<leftHeader>
  <Text HA="1" VA="1" WW="1" M="7.56 5.67 7.56 5.67" />
  <NumberFormat F="" FT="0" />
  <Font F="Calibri" S="9" C="#000000" A="0" B="true" />
  <Borders />
  <Hyperlink />
  </leftHeader>
  <internalFormatConditions />
  </style>
  </grid>
  <windowsPosition>Maximized</windowsPosition>
  <hasPivot>1</hasPivot>
  </meta>
  </GetEaxMdResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
 "GetEaxMd" : 
  {
   "tEax" : 
    {
     "id" : "S1!M!S!E1"
    },
   "tArg" : 
    {
     "pattern" : 
      {
       "obInst" : "false",
       "gridStyle" : 
        {
         "parts" : 
          {
           "it" : 
            [
              "FixedCorner",
              "TopHeader",
              "LeftHeader"
            ]
          },
         "ops" : 
          {
           "it" : 
            {
             "Key" : "InternalFormatConditions",
             "Value" : "Get"
            }
          }
        }
      }
    }
  }
}

JSON response:

{
 "GetEaxMdResult" : 
  {
   "id" : 
    {
     "id" : "S1!M!S!E1"
    },
   "meta" : 
    {
     "grid" : 
      {
       "style" : 
        {
         "fixedCorner" : 
          {
           "Text" : 
            {
             "@VA" : "1",
             "@HA" : "-1",
             "@M" : "7.56 5.67 7.56 5.67",
             "@WW" : "1"
            },
           "NumberFormat" : 
            {
             "@F" : "",
             "@FT" : "0"
            },
           "Font" : 
            {
             "@A" : "0",
             "@B" : "true",
             "@S" : "9",
             "@C" : "#000000",
             "@F" : "Calibri"
            },
           "Borders" : "",
           "Hyperlink" : ""
          },
         "topHeader" : 
          {
           "Text" : 
            {
             "@VA" : "1",
             "@HA" : "2",
             "@M" : "7.56 5.67 7.56 5.67",
             "@WW" : "1"
            },
           "NumberFormat" : 
            {
             "@F" : "",
             "@FT" : "0"
            },
           "Font" : 
            {
             "@A" : "0",
             "@B" : "true",
             "@S" : "9",
             "@C" : "#000000",
             "@F" : "Calibri"
            },
           "Borders" : "",
           "Hyperlink" : ""
          },
         "leftHeader" : 
          {
           "Text" : 
            {
             "@VA" : "1",
             "@HA" : "1",
             "@M" : "7.56 5.67 7.56 5.67",
             "@WW" : "1"
            },
           "NumberFormat" : 
            {
             "@F" : "",
             "@FT" : "0"
            },
           "Font" : 
            {
             "@A" : "0",
             "@B" : "true",
             "@S" : "9",
             "@C" : "#000000",
             "@F" : "Calibri"
            },
           "Borders" : "",
           "Hyperlink" : ""
          },
         "internalFormatConditions" : ""
        }
      },
     "windowsPosition" : "Maximized",
     "hasPivot" : "1"
    }
  }
}
    public static EaxGridStyle GetEaxGridStyle(EaxId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tEaxMd = new GetEaxMd()
{
tArg = new GetEaxMdArg()
{
//Pattern that will be used to get metadata
pattern = new EaxMdPattern()
{
obInst = false,
gridStyle = new EaxGridStylePattern()
{
parts = new EaxGridStylePart[]
{
EaxGridStylePart.FixedCorner,
EaxGridStylePart.TopHeader,
EaxGridStylePart.LeftHeader
},
ops = new EaxGridStylePartListOpsIT[]
{
new EaxGridStylePartListOpsIT() { Key = EaxGridStylePart.InternalFormatConditions, Value = ListOperation.Get },
}
}
}
},
tEax = moniker
};
//Get information about styles of various table elements
var result = somClient.GetEaxMd(tEaxMd);
return result.meta.grid.style;
}

See also:

GetEaxMd: Operation