44
- 65 -
thisform.oReport = xfrx("XFRX#DRAW")
IF thisform.oReport.openDocument("file.xff")
thisform.cntXFRX.reset()
loSession.XFRXPreviewer = thisform.cntXFRX
loSession.previewReport(thisform.oReport)
ENDIF
18.1.6 Hyperlink decoration
A new property has been added to the XFCont, cntXFRXMultipage and frmMPPreviewer
classes: UnderlineHyperlinksOnPrint. You can use the following values:
0 - no decoration for hyperlinks
1 - display "normal" hyperlinks in blue, but do not decorate custom event hyperlinks
(green)
2 - (default value) decorate both blue and green hyperlinks
To support this in the print output, the PrintDocument method of the XFRX#DRAW
class has a new parameter, tnUnderlineHyperlinksOnPrint, with the same values and
logic.
18.1.7 Custom buttons
This feature is implemented using the extension handler mechanism: A new method is
now supported - ToolbarOnInit, which is invoked at the time the toolbar is initialized. In
this method the extension handler can add new buttons to the previewer and their click
events can be bound with other methods in the extension handler. A new property is now
supported, too - oPreviewContainer. If it is available, the previewer will automatically fill
it with the XFCont object reference for easier access to the previewer properties in the
custom buttons click event methods.
Example:
use demoreps\sales
local loSession, lnRetval, loXFF, loPreview, loScripts
loSession=EVALUATE([xfrx("XFRX#LISTENER")])
lnRetVal = loSession.SetParams(,,,,,,"XFF") && no name = just in memory
If lnRetVal = 0
REPORT FORM demoreps\sales object loSession
*
* the XFRX#DRAW object reference is stored in oxfDocument property
*
loXFF = loSession.oxfDocument
*
* initialize the previewer
*
SET PATH TO xfrxlib
SET CLASSLIB TO xfrxlib ADDITIVE
loPreview = CREATEOBJECT("frmMPPreviewer")
*
* setup the extension handler