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