Sets the printer properties at runtime. This function should be called wile processing the SAM_ReportStart event.

Namespace: PPJ.Runtime
Assembly: PPJ.Runtime.2 (in PPJ.Runtime.2.dll) Version: 2.0.1044.0 (2.0.1044.5276)

Syntax

C#
public static SalBoolean ReportSetPrinterSettings(
	SalWindowHandle hWndReport,
	SalString strPrinterName,
	SalNumber nOrientation,
	SalNumber nPaperType,
	SalNumber nWidth,
	SalNumber nHeight
)

Parameters

hWndReport
Type: PPJ.Runtime..::..SalWindowHandle
strPrinterName
Type: PPJ.Runtime..::..SalString
Friendly name of the printer. Pass STRING_Null or an empty string if you do not want to switch the printer.
nOrientation
Type: PPJ.Runtime..::..SalNumber
Paper Orientation. Use one of the following constants: RPT_Portrait for portrait mode.RPT_Landscape for landscape mode.Use -1 if you do not want to change the orientation.
nPaperType
Type: PPJ.Runtime..::..SalNumber
Paper type. Use one of the RPT_Paper* constants or the PaperKind enum.
nWidth
Type: PPJ.Runtime..::..SalNumber
Paper width in milli-inches. This value is ignored for all paper types except for RPT_PaperCustom.
nHeight
Type: PPJ.Runtime..::..SalNumber
Paper height in milli-inches. This value is ignored for all paper types except for RPT_PaperCustom.

Return Value

See Also