RegisterScript Method
Object.RegisterScript(toScriptObject, tcScriptMethod [, tnZOrder [, tcPageScope [, tnNumberingType]]])
Parameters
toScriptObject
The PDFLScripts object reference.
tcScriptMethod
The name of the method containing the script.
tnZOrder
Specifies an integer indicating the position of the object relative to other objects in page. If you omit nOrder, the setting is 0.
Value | Description |
---|---|
0 | Print below (before) the report page. |
1 | Print above (after) the report page. |
tcPageScope
Defines which pages to invoke the scripts on. Can contain "ALL", "ODD", "EVEN" and numbers delimited with commas. Hyphens can be used to define the from-to scope. Examples: "ODD", "1,5-19", "ODD,4,8"
tnNumberingType
Defines how XFRX determines the page number:
Value | Description |
---|---|
0 | Absolute - the page number in the document. |
1 | Relative - the page number in the current report. |
2 | The value of _PAGENO |
Remarks
Applies To: XFRX#INIT, XFRX#LISTENER, oXFRX
XFRX version: 24.0 for oXFRX
Examples
LOCAL m.lnErr m.loXFRX=EVALUATE([xfrx("XFRX#INIT")]) m.lnErr=m.loXFRX.SetParams(,,,,.T.,,"XFF") IF m.lnErr=0 m.loScripts = CREATEOBJECT("myXFRXScripts") m.loXFRX.registerScript(loScripts, "drawBlueRectangle",0, "ALL", 0) m.loXFRX.unregisterAllScripts() ENDIF DEFINE CLASS myXFRXScripts AS CUSTOM PROCEDURE drawBlueRectangle LPARAMETERS m.oXFD m.oXFD.setColor(0,0,255,-1,-1,-1) m.oXFD.drawRectangle(100,200,50,50) ENDPROC ENDDEFINE