Opening Express Report and Getting Metadata

Below is the example of using the OpenEax operation to open an express report for edit. The request contains moniker of the object that is an express report and the pattern to be used to get metadata. The report opens for edit. The response contains the opened express report instance moniker and the specified metadata.

The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier section.

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">
<OpenEax xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns=" ">
  <id>S1!M!189</id>
  </tObject>
<tArg xmlns=" ">
<args>
  <openForEdit>true</openForEdit>
  </args>
<metaGet>
  <obInst>true</obInst>
<table>
  <cells>true</cells>
  </table>
  <title>true</title>
  </metaGet>
  </tArg>
  </OpenEax>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OpenEaxResult 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=" ">
<obInst>
<obDesc isShortcut="0">
  <i>EXPRESS_1</i>
  <n>Express report</n>
  <k>189</k>
  <c>2561</c>
  <p>182</p>
  <h>0</h>
  </obDesc>
  </obInst>
<table rowCount="4" columnCount="3">
<cells>
  <c v="89.237400" dt="3" row="0" column="0" />
  <c v="49.846103" dt="3" row="0" column="1" />
  <c v="24.467523" dt="3" row="0" column="2" />
  <c v="73.113754" dt="3" row="1" column="0" />
  <c v="48.060544" dt="3" row="1" column="1" />
  <c v="32.551410" dt="3" row="1" column="2" />
  <c v="74.107930" dt="3" row="2" column="0" />
  <c v="54.622097" dt="3" row="2" column="1" />
  <c v="29.370052" dt="3" row="2" column="2" />
  <c v="60.189477" dt="3" row="3" column="0" />
  <c v="17.439952" dt="3" row="3" column="1" />
  <c v="14.059756" dt="3" row="3" column="2" />
  </cells>
  </table>
  <windowsPosition>Maximized</windowsPosition>
<title>
<font>
  <family>Calibri</family>
<style>
  <it>Regular</it>
  </style>
<size>
  <width>-1</width>
  <height>12</height>
  <units>DLU96</units>
  </size>
  </font>
  <textColor>#000000</textColor>
  <backgroundColor>#FFFFFF</backgroundColor>
  <textAlignment>Near</textAlignment>
<size>
  <width>-1</width>
  <height>24000</height>
  <units>Mkm</units>
  </size>
  <visible>1</visible>
  <xamlText><?xml version="1.0" encoding="utf-16"?><TextBlock FontFamily="Calibri" FontStyle="Normal" FontWeight="Bold" FontSize="16" Foreground="#FF000000" Background="#FFFFFFFF" TextAlignment="Left" TextWrapping="Wrap" FlowDirection="LeftToRight" VerticalAlignment="Stretch" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Run xml:lang="ru-ru">Data for two half years</Run></TextBlock></xamlText>
  <xamlTitle><?xml version="1.0" encoding="utf-16"?> <TextBlock FontFamily="Calibri" FontStyle="Normal" FontWeight="Bold" FontSize="16" Foreground="#FF000000" Background="#FFFFFFFF" TextAlignment="Left" TextWrapping="Wrap" FlowDirection="LeftToRight" VerticalAlignment="Stretch" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Run xml:space="preserve" xml:lang="ru-ru">Data for two half years</Run></TextBlock></xamlTitle>
  </title>
  </meta>
  </OpenEaxResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
 "OpenEax" : 
  {
   "tObject" : 
    {
     "id" : "S1!M!189"
    },
   "tArg" : 
    {
     "args" : 
      {
       "openForEdit" : "true",
       "storeObject" : "true"
      },
     "metaGet" : 
      {
       "obInst" : "true",
       "gridStyle" : 
        {
         "all" : "true"
        }
      }
    }
  }
}

JSON response:

{
 "OpenEaxResult" : 
  {
   "id" : 
    {
     "id" : "S1!M!S!E3"
    },
   "meta" : 
    {
     "obInst" : 
      {
       "obDesc" : 
        {
         "@isShortcut" : "0",
         "@isLink" : "0",
         "i" : "EXPRESS_1",
         "n" : "Express report",
         "k" : "189",
         "c" : "2561",
         "p" : "182",
         "h" : "0"
        }
      },
     "dirty" : "0",
     "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" : ""
          },
         "internals" : 
          {
           "Text" : 
            {
             "@VA" : "1",
             "@HA" : "0",
             "@M" : "7.56 5.67 7.56 5.67",
             "@WW" : "1"
            },
           "NumberFormat" : 
            {
             "@F" : "#,##0.00",
             "@FT" : "1"
            },
           "Font" : 
            {
             "@A" : "0",
             "@S" : "9",
             "@C" : "#000000",
             "@F" : "Calibri"
            },
           "Borders" : "",
           "Hyperlink" : ""
          },
         "ABC" : 
          {
           "Text" : 
            {
             "@VA" : "-1",
             "@HA" : "-1",
             "@M" : "-3.78 -3.78 -3.78 -3.78",
             "@WW" : "-1"
            },
           "Fill" : 
            {
             "@C" : "#CCFFCC"
            },
           "Font" : 
            {
             "@A" : "0",
             "@S" : "8",
             "@C" : "#000000",
             "@F" : "Arial"
            },
           "Borders" : "",
           "Hyperlink" : ""
          },
         "ABCHeader" : 
          {
           "Text" : 
            {
             "@VA" : "-1",
             "@HA" : "-1",
             "@M" : "-3.78 -3.78 -3.78 -3.78",
             "@WW" : "-1"
            },
           "Font" : 
            {
             "@A" : "0",
             "@B" : "true",
             "@S" : "8",
             "@C" : "#000000",
             "@F" : "Arial"
            },
           "Borders" : "",
           "Hyperlink" : ""
          },
         "highlightedCells" : 
          {
           "Text" : 
            {
             "@VA" : "-1",
             "@HA" : "-1",
             "@M" : "-3.78 -3.78 -3.78 -3.78",
             "@WW" : "-1"
            },
           "Font" : 
            {
             "@A" : "0",
             "@B" : "true",
             "@S" : "8",
             "@C" : "#FF0000",
             "@F" : "Arial"
            },
           "Borders" : "",
           "Hyperlink" : ""
          },
         "changedCells" : 
          {
           "Text" : 
            {
             "@VA" : "-1",
             "@HA" : "-1",
             "@M" : "-3.78 -3.78 -3.78 -3.78",
             "@WW" : "-1"
            },
           "Font" : 
            {
             "@A" : "0",
             "@B" : "true",
             "@S" : "8",
             "@C" : "#000000",
             "@F" : "Arial"
            },
           "Borders" : "",
           "Hyperlink" : ""
          },
         "virtualCells" : 
          {
           "Text" : 
            {
             "@VA" : "-1",
             "@HA" : "-1",
             "@M" : "-3.78 -3.78 -3.78 -3.78",
             "@WW" : "-1"
            },
           "Font" : 
            {
             "@A" : "0",
             "@S" : "8",
             "@C" : "#000000",
             "@F" : "Arial"
            },
           "Borders" : "",
           "Hyperlink" : ""
          },
         "table" : 
          {
           "Name" : "EAX table style",
           "Range" : 
            {
             "left" : "0",
             "top" : "0",
             "width" : "0",
             "height" : "0"
            },
           "Corner" : 
            {
             "Text" : 
              {
               "@VA" : "-1",
               "@HA" : "-1",
               "@M" : "-3.78 -3.78 -3.78 -3.78",
               "@WW" : "-1"
              },
             "Fill" : 
              {
               "@C" : "#DEE5F8"
              },
             "Font" : 
              {
               "@A" : "0",
               "@S" : "8",
               "@C" : "#000000",
               "@F" : "Arial"
              },
             "Borders" : "",
             "Hyperlink" : ""
            },
           "FirstRow" : 
            {
             "Width" : "1",
             "Style" : 
              {
               "Text" : 
                {
                 "@VA" : "-1",
                 "@HA" : "-1",
                 "@M" : "-3.78 -3.78 -3.78 -3.78",
                 "@WW" : "-1"
                },
               "Fill" : 
                {
                 "@C" : "#FFFFFF"
                },
               "Font" : 
                {
                 "@A" : "0",
                 "@S" : "8",
                 "@C" : "#000000",
                 "@F" : "Arial"
                },
               "Borders" : "",
               "Hyperlink" : ""
              }
            },
           "SecondRow" : 
            {
             "Width" : "1",
             "Style" : 
              {
               "Text" : 
                {
                 "@VA" : "-1",
                 "@HA" : "-1",
                 "@M" : "-3.78 -3.78 -3.78 -3.78",
                 "@WW" : "-1"
                },
               "Fill" : 
                {
                 "@C" : "#ECEFF6"
                },
               "Font" : 
                {
                 "@A" : "0",
                 "@S" : "8",
                 "@C" : "#000000",
                 "@F" : "Arial"
                },
               "Borders" : "",
               "Hyperlink" : ""
              }
            },
           "FirstColumn" : 
            {
             "Width" : "1"
            },
           "SecondColumn" : 
            {
             "Width" : "1"
            },
           "HeaderRow" : 
            {
             "Width" : "1",
             "Style" : 
              {
               "Text" : 
                {
                 "@VA" : "-1",
                 "@HA" : "-1",
                 "@M" : "-3.78 -3.78 -3.78 -3.78",
                 "@WW" : "-1"
                },
               "Fill" : 
                {
                 "@C" : "#ECEFF6"
                },
               "Font" : 
                {
                 "@A" : "0",
                 "@S" : "8",
                 "@C" : "#000000",
                 "@F" : "Arial"
                },
               "Borders" : 
                {
                 "Border" : 
                  [
                    {
                     "@S" : "0",
                     "@C" : "#BBBBBB",
                     "@I" : "2"
                    },
                    {
                     "@S" : "0",
                     "@C" : "#BBBBBB",
                     "@I" : "5"
                    },
                    {
                     "@S" : "0",
                     "@C" : "#FFFFFF",
                     "@I" : "6"
                    },
                    {
                     "@S" : "0",
                     "@C" : "#FFFFFF",
                     "@I" : "7"
                    }
                  ]
                },
               "Hyperlink" : ""
              }
            },
           "HeaderColumn" : 
            {
             "Width" : "1",
             "Style" : 
              {
               "Text" : 
                {
                 "@VA" : "-1",
                 "@HA" : "-1",
                 "@M" : "-3.78 -3.78 -3.78 -3.78",
                 "@WW" : "-1"
                },
               "Fill" : 
                {
                 "@C" : "#DEE5F8"
                },
               "Font" : 
                {
                 "@A" : "0",
                 "@S" : "8",
                 "@C" : "#000000",
                 "@F" : "Arial"
                },
               "Borders" : 
                {
                 "Border" : 
                  [
                    {
                     "@S" : "0",
                     "@C" : "#BBBBBB",
                     "@I" : "3"
                    },
                    {
                     "@S" : "0",
                     "@C" : "#BBBBBB",
                     "@I" : "4"
                    },
                    {
                     "@S" : "0",
                     "@C" : "#FFFFFF",
                     "@I" : "6"
                    },
                    {
                     "@S" : "0",
                     "@C" : "#FFFFFF",
                     "@I" : "7"
                    }
                  ]
                },
               "Hyperlink" : ""
              }
            },
           "FooterRow" : 
            {
             "Width" : "0"
            },
           "FooterColumn" : 
            {
             "Width" : "0"
            },
           "PredefinedStyle" : "ExtDarkBlueStriped",
           "IsEmpty" : "0"
          },
         "calcs" : "",
         "internalFormatConditions" : "",
         "totalsFormatConditions" : "",
         "ABCFormatConditions" : "",
         "rangeFormatConditions" : ""
        }
      },
     "windowsPosition" : "Maximized",
     "hasPivot" : "1"
    }
  }
}
    public static OpenEaxResult OpenEaxEx(MbId mb, string eaxId, EaxMdPattern pattern)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tOpen = new OpenEax()
{
tArg = new OpenEaxArg()
{
args = new EaxOpenArgs() { openForEdit = true},
//Pattern that will be used to get metadata
metaGet = pattern
},
//Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, eaxId).k }
};
//Open express report
var result = somClient.OpenEax(tOpen);
return result;
}

See also:

OpenEax: Operation