Below is the example of using the GetPrxMd operation to get information about all sheets of a regular report. The request contains moniker of opened regular report instance and a pattern indicating whether information about the sheets must be obtained. The response contains requested information.
{ "GetPrxMd" : { "tPrx" : { "id" : "S1!M!S!P1" }, "tArg" : { "pattern" :
{ "obInst" : "true", "sheet" : { "pageSettings" : "true" }, "sheets" : "Get" } } } }
{ "GetPrxMdResult" : { "id" : { "id" : "S1!M!S!P1"
}, "meta" : { "obInst" : { "obDesc" : { "@isShortcut" : "0", "@isLink" : "0", "i" : "REPORT_1",
"n" : "Regular report", "k" : "6334", "c" : "2562", "p" : "6333", "h" : "0" }, "openArgs" : "" }, "sheets" : {
"active" : "0", "its" : { "it" : [ { "k" : "1", "id" : "Sheet1", "n" : "Sheet1", "vis" : "1",
"type" : "Table", "isActive" : "1", "pageSettings" : { "paperSize" : { "width" : "210000", "height" : "297000", "units" : "Mkm" },
"margins" : { "left" : "10000", "top" : "10000", "right" : "10000", "bottom" : "10000", "units" : "Mkm" }, "paperFormat" : "A4", "paperOrientation" : "Portrait",
"centerHorizontal" : "0", "centerVertical" : "0", "printHyperlinks" : "0", "blackAndWhite" : "0", "printOrder" : "FromTopToBottom", "scale" : { "value" : "1.000000", "fitToPages" : "0", "pageWidth" : "-1",
"pageHeight" : "-1" }, "startPageNumber" : "0", "useSheetPageCount" : "0" }, "dataChange" : { "isDataChanged" : "0" } },
{ "k" : "2", "id" : "Document1", "n" : "Document1", "vis" : "1", "type" : "Document", "isActive" : "0", "pageSettings" : { "paperSize"
{ "width" : "210000", "height" : "297000", "units" : "Mkm" }, "margins" : { "left" : "10000", "top" : "10000", "right" : "10000",
"bottom" : "10000", "units" : "Mkm" }, "paperFormat" : "A4", "paperOrientation" : "Portrait", "centerHorizontal" : "0", "centerVertical" : "0", "printHyperlinks" : "0", "blackAndWhite" : "0", "printOrder" : "FromTopToBottom",
"scale" : { "value" : "1.000000", "fitToPages" : "0", "pageWidth" : "-1", "pageHeight" : "-1" }, "startPageNumber" : "0", "useSheetPageCount" : "0" }
} ] } }, "dataChange" : { "isDataChanged" : "0" } } } }
public static GetPrxMdResult GetPrxMd(PrxId moniker) { var somClient = new SomPortTypeClient(); //Proxy object for operation execution //Operation execution parameters var tArg = new GetPrxMd() { tArg = new GetPrxMdArg() { pattern = new PrxMdPattern() { sheets = ListOperation.Get, sheet = new PrxSheetPattern() { pageSettings = true } } }, tPrx = moniker }; //Get metadata var result = somClient.GetPrxMd(tArg); return result; }
See also: