bool SetPrxMetaSheetPageSettings(string mon, PrxMetaSheetPageSettings settings)
mon. Moniker for working with regular report sheet.
settings. Print options to be changed.
The SetPrxMetaSheetPageSettings operation changes print options for regular report sheet.
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.
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.
{
"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"
}
}
}
}
}
}
{
"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: