Page tree
Skip to end of metadata
Go to start of metadata


The generated documents can include hyperlinks for faster navigation, PDF documents can also include bookmarks. The hyperlinks and bookmarks are controlled via Comment field of labels and fields.

In the beta version of VFP 9 there is a bug that makes it impossible to store anything into fields’ comment. Because XFRX uses the comment field to define hyperlinks and bookmarks, the “User data” field is now used for this purpose. In the final version, XFRX for VFP 9 will work both with comment and user data field.

This paragraph applies both to VFP 9 and VFP 8.

The hyperlinks are controlled via Comment field of report labels or fields. 

To create a link, you need a source field (the underlined text you will navigate from) and a target field (the place where you get when you click on a hyperlink). 

Creating source fields

Enter the following text into the comment of the source field:

#UR A HREF=<destination name>

The destination name is an expression, which is evaluated at the time of report generation. You can navigate to other fields in the same document, or to any URL. The destination names of other fields in the same document has to be preceeded with #.


#UR A HREF="#top"

Navigates to the beginning of the document. "top" is a reserved word. Do not name target fields are "top".

#UR A HREF="#custlist"

Navigates to the field whose destination name is "custlist".

#UR A HREF="#"

Navigates to the field whose destination name is eval(


Navigates to homepage

Creating target fields

To add a destination name to a (target) field, add the following text into the comment:

#UR A NAME=<destination name>



This field will be a target field for source fields with HREF="#"


This paragraph applies both to VFP 9 and VFP 8.

Bookmarks are currently supported in PDF, HTML documents and XFRX previewer.

Bookmarks (document outline) serves as a "visual table of contents" to display the document structure. Users use this to interactively navigate in the document. To add a report field into the document outline simply put the following into the field's comment:

#UR OUTLINE=<outline_name>
#UR OUTLINESTYLE=<outline style number> && 0 - normal, 1 - italic, 2 - bold, 3 - italic+bold

 The outline_name is an expression, which is evaluated at the time of report generation and the result is used as the bookmark item. If users click the bookmark, they will navigate to the corresponding report field.


In a report with a list of invoices grouped by customers, bookmarks containing the list of customer can be created by adding

#UR OUTLINE=invoices.customerName
#UR OUTLINESTYLE=IIF(ATC("a",invoices.customerName)>0,1,0)+IIF(ATC("t",invoices.customerName)>0,2,0)

into the comment of a customer name field (or any other field you want to navigate to, e.g. the first field on a page with the customer).


To enable bookmarks in the HTML output, call

m.loSession.SetOtherParams("PRINT_BOOKMARKS",.T.,1) && Only bookmarks from report
m.loSession.SetOtherParams("PRINT_BOOKMARKS",.T.,2) && Only bookmarks to pages
m.loSession.SetOtherParams("PRINT_BOOKMARKS",.T.,3) && Page and report bookmarks

before calling loSession.ProcessReport()

With bookmarks enabled, XFRX will generate three HTML pages (three files): the main page defining the page frames, the bookmark page and the page with the report output.


XFRX 16.1

Methods SetOutline() and SetOutlineTypes() are deprecated since XFRX 16.1.
Member  oDocument of XFRX Session object is deprecated too. You can use member oDocumentWriter.

  • No labels