SetPrxMetaSheetPageSettings

Syntax

bool SetPrxMetaSheetPageSettings(string mon, PrxMetaSheetPageSettings settings)

Parameters

mon. Moniker for working with regular report sheet.

settings. Print options to be changed.

Description

The SetPrxMetaSheetPageSettings operation changes 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 changed. The regular report instance moniker can be obtained on executing the OpenPrxMeta operation.

The operation results in the logical True if the settings were changed successfully.

Example

Below is the example of changing print options for regular report sheet. The request contains sheet moniker and print options to be changed. The response contains whether the options are applied successfully.

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">
<SetPrxMetaSheetPageSettings xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">S1!M!S!P1!Sheets!1</mon>
<settings xmlns="">
  <useSheetPageCount>true</useSheetPageCount>
  <startPageNumber>2</startPageNumber>
<tabPageSettings>
  <blackAndWhite>false</blackAndWhite>
<gxPageSettings>
  <paperOrientation>Landscape</paperOrientation>
  <paperFormat>A3</paperFormat>
<margins>
  <left>20</left>
  <top>10</top>
  <right>10</right>
  <bottom>10</bottom>
  <units>Mm</units>
  </margins>
  </gxPageSettings>
  </tabPageSettings>
  </settings>
  </SetPrxMetaSheetPageSettings>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetPrxMetaSheetPageSettingsResult 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">1</SetPrxMetaSheetPageSettingsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetPrxMetaSheetPageSettings" :
{
"mon" : "S1!M!S!P1!Sheets!1",
"settings" :
{
"useSheetPageCount" : "true",
"startPageNumber" : "2",
"tabPageSettings" :
{
"blackAndWhite" : "false",
"gxPageSettings" :
{
"paperOrientation" : "Landscape",
"paperFormat" : "A3",
"margins" :
{
"left" : "20",
"top" : "10",
"right" : "10",
"bottom" : "10",
"units" : "Mm"
}
}
}
}
}
}

JSON response:

{
"SetPrxMetaSheetPageSettingsResult" : "1"
}
public static bool SetSheetSettings(string moniker, uint sheetKey)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetPrxMetaSheetPageSettings()
{
settings = new PrxMetaSheetPageSettings()
{
startPageNumber = 2,
useSheetPageCount = true,
tabPageSettings = new TabMetaPageSettings()
{
blackAndWhite = false,
gxPageSettings = new GxMetaPageSettings()
{
margins = new GxPageMargins()
{
bottom = 10,
left = 20,
right = 10,
top = 10
},
paperFormat = GxPaperFormat.A3,
paperOrientation = GxPaperOrientation.Landscape,
}
}
},
mon = moniker + "!Sheets!" + sheetKey.ToString()
};
//Change page settings
var result = somClient.SetPrxMetaSheetPageSettings(tSet);
return result;
}

See also:

Working with Regular Reports