GetPrxMetaSheetPageSettings

Syntax

PrxMetaSheetPageSettings GetPrxMetaSheetPageSettings(string mon, PrxMetaSheetPageSettings settings)

Parameters

mon. Moniker for working with regular report sheet.

settings. Print options to be obtained.

Description

The GetPrxMetaSheetPageSettings operation gets print options for regular report sheet.

Comments

To execute the operation, in the mon field specify moniker of regular report instance with the !Sheets!sheet key postfix, and in the settings field specify print options to be obtained. The regular report instance moniker can be obtained on executing the OpenPrxMeta operation.

In the settings field set empty values or default values for the fields, which values should be obtained. Specify one element for collections. To get information about a specific regular report element, specify its key in metadata. If -1 is specified as a key value, information about all elements of this type is obtained.

Example

Below is the example of getting print options for regular report sheet. The request contains sheet moniker and empty values of the fields, for which the specified settings should be obtained. The response contains the obtained information.

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">
<GetPrxMetaSheetPageSettings xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">S1!M!S!P1!Sheets!1</mon>
<settings xmlns="">
  <useSheetPageCount>false</useSheetPageCount>
  <startPageNumber>0</startPageNumber>
<tabPageSettings>
<scale>
  <value>0</value>
  <fitToPages>false</fitToPages>
  <pageWidth>0</pageWidth>
  <pageHeight>0</pageHeight>
  </scale>
  <blackAndWhite>false</blackAndWhite>
<gxPageSettings>
<paperSize>
  <width>0</width>
  <height>0</height>
  <units>Mm</units>
  </paperSize>
  <paperOrientation>Portrait</paperOrientation>
  <paperFormat>Custom</paperFormat>
<margins>
  <left>0</left>
  <top>0</top>
  <right>0</right>
  <bottom>0</bottom>
  <units>Mm</units>
  </margins>
  </gxPageSettings>
  </tabPageSettings>
  </settings>
  </GetPrxMetaSheetPageSettings>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetPrxMetaSheetPageSettingsResult 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">
  <useSheetPageCount xmlns="">0</useSheetPageCount>
  <startPageNumber xmlns="">0</startPageNumber>
<tabPageSettings xmlns="">
<scale>
  <value>1</value>
  <fitToPages>0</fitToPages>
  <pageWidth>-1</pageWidth>
  <pageHeight>-1</pageHeight>
  </scale>
  <blackAndWhite>0</blackAndWhite>
<gxPageSettings>
<paperSize>
  <width>210000</width>
  <height>297000</height>
  <units>Mkm</units>
  </paperSize>
  <paperOrientation>Portrait</paperOrientation>
  <paperFormat>A4</paperFormat>
<margins>
  <left>17</left>
  <top>19</top>
  <right>17</right>
  <bottom>19</bottom>
  <units>Mm</units>
  </margins>
  </gxPageSettings>
  </tabPageSettings>
  </GetPrxMetaSheetPageSettingsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetPrxMetaSheetPageSettings" :
{
"mon" : "S1!M!S!P1!Sheets!1",
"settings" :
{
"useSheetPageCount" : "false",
"startPageNumber" : "0",
"tabPageSettings" :
{
"scale" :
{
"value" : "0",
"fitToPages" : "false",
"pageWidth" : "0",
"pageHeight" : "0"
},
"blackAndWhite" : "false",
"gxPageSettings" :
{
"paperSize" :
{
"width" : "0",
"height" : "0",
"units" : "Mm"
},
"paperOrientation" : "Portrait",
"paperFormat" : "Custom",
"margins" :
{
"left" : "0",
"top" : "0",
"right" : "0",
"bottom" : "0",
"units" : "Mm"
}
}
}
}
}
}

JSON response:

{
"GetPrxMetaSheetPageSettingsResult" :
{
"useSheetPageCount" : "0",
"startPageNumber" : "0",
"tabPageSettings" :
{
"scale" :
{
"value" : "1",
"fitToPages" : "0",
"pageWidth" : "-1",
"pageHeight" : "-1"
},
"blackAndWhite" : "0",
"gxPageSettings" :
{
"paperSize" :
{
"width" : "210000",
"height" : "297000",
"units" : "Mkm"
},
"paperOrientation" : "Portrait",
"paperFormat" : "A4",
"margins" :
{
"left" : "17",
"top" : "19",
"right" : "17",
"bottom" : "19",
"units" : "Mm"
}
}
}
}
}
public static PrxMetaSheetPageSettings GetSheetSettings(string moniker, uint sheetKey)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetPrxMetaSheetPageSettings()
{
settings = new PrxMetaSheetPageSettings()
{
startPageNumber = new long(),
useSheetPageCount = new bool(),
tabPageSettings = new TabMetaPageSettings()
{
blackAndWhite = new bool(),
gxPageSettings = new GxMetaPageSettings()
{
margins = new GxPageMargins(),
paperFormat = new GxPaperFormat(),
paperOrientation = new GxPaperOrientation(),
paperSize = new SizeU()
},
scale = new TabPrintScale()
{
fitToPages = new bool(),
pageHeight = new long(),
pageWidth = new long(),
value = new double()
}
}
},
mon = moniker + "!Sheets!" + sheetKey.ToString()
};
//Get page settings
var result = somClient.GetPrxMetaSheetPageSettings(tGet);
return result;
}

See also:

Working with Regular Reports