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 extract metadata. The report opens for edit. The response contains the opened express report instance moniker and the specified metadata.
{ "OpenEax" : { "tObject" :
{ "id" : "S1!M!189" }, "tArg" : { "args" : { "openForEdit" : "true", "storeObject" : "true" },
"metaGet" : { "obInst" : "true", "gridStyle" : { "all" : "true" } } } } }
{ "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" } } }
The OpenEaxEx function specified below opens repository express report for edit. The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example. The repository connection moniker and the express report identifier are sent as input parameters. The pattern input parameter must also contain a pattern to be used to extract metadata, such as:
var eaxPattern = new EaxMdPattern() { title = true, table = new PvtTablePattern() { cells = true } };
The result of the operation is the result of the function.
public static OpenEaxResult OpenEaxEx(MbId mb, string eaxId, EaxMdPattern pattern) { var somClient = new SomPortTypeClient(); //Proxy object for operation execution //Search repository object var eaxObj = FindObjectById(mb, eaxId); //Operation execution parameters var tOpen = new OpenEax() { tArg = new OpenEaxArg() { args = new EaxOpenArgs() { openForEdit = true}, //The pattern, according to which the metadata will be extracted metaGet = pattern }, //Form object moniker tObject = new OdId() { id = mb.id + "!" + eaxObj.k } }; //Open express report var result = somClient.OpenEax(tOpen); return result; }
See also: