37
- 18 -
6.9 Printing page ranges
Note: This paragraph applies to VFP 8 only. In VFP 9.0, please use the RANGE clause
of the REPORT FORM command to achieve the same.
To define the page range, call setPageRange() method before calling calling
ProcessReport(). There are two possible ways how to call the setPageRange() method:
setPageRange(tnFrom, tnTo)
tnFrom and tnTo define the from-to range. If tnTo is empty, the total number of
pages is used
Example:
loSession.setPageRange(5,10)
setPageRange(tcRange)
tcRange is a string, which can contain page numbers and page ranges delimited
by commas, the page range is defined as "from-to".
Example:
loSession.setPageRange("1,4,10-20,25")
6.10 User-defined page size
Note: This paragraph applies both to VFP 80. and VFP 9.0
You can define the page size of the generated document. The user-defined page size will
override the page size stored in the report. To define the user-defined page size, call
setPaperSize() method with paper width and paper height as parameters:
setPaperSize(nUDPaperWidth, nUDPaperHeight)
The unit is Inch * 10000.
See also: HTML page size adjustment na stránce 34.
6.11 Zipping the generated files
Note: This paragraph applies both to VFP 8.0 and VFP 9.0
The generated file can be automatically zipped. This feature is controlled by the last
three parameters of SetParams() method of XFRXSession and XFRXListener classes (see
the reference na stránce 80) or, with an equivalent behavior, by the three parameters of
ZipDocument() method of XFRXListener class (reference na stránce 90).
Example:
With the following SetParams parameters, XFRX first creates "invoices.pdf", then
creates "archive.zip" (if it doesn't exist) and adds "invoices.pdf" into the archive. Then
the original "invoices.pdf" will be deleted:
loSession.SetParams("invoices.pdf",,.T.,,,,"PDF","archive.zip", .t., .t.)