Version 9.6
Release date: 05/24/2004
Installation note: Please be aware that all three libraries
have been updated in this version (hndlib.dll, zlib.dll and xfrxlib.fll).
Bug fixes
-
Fixes in XLS output format:
-
Excel version check has been added
-
Texts that could have been evaluated as numeric expressions (e.g. 10-2, 45/3)
were incorrectly transformed as numerics in Excel output
-
Numeric expressions with formats can now be converted to formatted numeric
cells
-
Page size, orientation and page margins are now correctly transformed to the
generated documents
-
chr(10) should work the same way as chr(13) or chr(13)+chr(10). Chr(10) was
ignored by XFRX.
-
Rectangles stretching from page header to page footer were too high if report
title was used
-
'opaque' ractangles with white back color should be printed as transparent.
(this worked incorrectly in output to images)
-
resizing the bookmark panel in the previewer generated an error is there were
no bookmarks
-
White lines were incorrectly printed as black in RTF output
-
Tabs are now supported in PDF
-
Problems with rotated underlined text in PDF have been fixed
New features
Note: If you are interested in making your reports accessible
via the internet, you can have a look at a web based report previewer demo
application utilizing XFRX compiled as VFP COM DLL. (Run
demo).
Zipping the generated file
The generated file can now be automatically zipped. We have added new
parameters to Setparams method:
SetParams method
Syntax:
XFRXSession::Setparams(tcOutputName, tcDirectory, tlNotOpenWiewer, tcCodePage,
tlSilent, tlNewSession, tcTarget, tcArchive, tlAdditive, tlDeleteFileAfter)
New parameters:
tcArchive
The name of the zip archive to be created. If not empty, the generated
file will be added to the archive after generation (optional)
tlAdditive
If set to .T. and the archive already exists, the file will be added.
(optional)
Please note: you can add several files to the archive, but existing files with
the same name will not be overwritten - the new files will always be added.
tlDeleteFileAfter
If set to .T., the generated file is be deleted after it is
copied to the archive. (optional)
Example:
With these SetParams parameters, XFRX first creates "invoices.pdf", then
creates "archive.zip" (if it doesn't exist) and adds "invoices.pdf" into the
archive. Then "invoices.pdf" will be deleted:
lnRetVal = loSession.SetParams("invoices.pdf",,.T.,,,,"PDF","archive.zip", .t.,
.t.)
Optional band printing
You can prevent individual report bands from printing by calling skipBands()
methods of the XFRXSession object. A parameter of this method is a string
containing a comma delimited list of bands that will be skipped. The bands are
represented by codes as stated in the following table:
| Band |
Code |
| Title |
T |
| Page header |
H |
| Column header |
CH |
| Group n header |
GHn |
| Detail |
D |
| Group n footer |
GFn |
| Column footer |
CF |
| Page footer |
F |
| Summary |
S |
Example:
loSession.skipBands("H,GH1,GF3,S")
Numeric field picture format in Excel
The format definition of numeric cells in Excel is different from the format
syntax used in Foxpro. XFRX is now able to convert the simple format
definitions and allows for user-defined implicit and/or explicit Excel-type
format definitions.
In Visual Foxpro, the numeric field is converted to its text representation
based on an explicit format definition (format field in the report expression
definition) or field's decimal places and SET DECIMAL setting.
When a numeric field is transformed to an Excel cell, the following algorithm
is used:
-
If there is an explicit XLS format defined, use it.
To define an explicit XLS format for a numeric
field, add:
#UR XLSF= (expression)
to the field's comment.
Example:
#UR XLSF="General"
The "General" formatting - no special formatting, the
number of decimal places is determined by the field's value
#UR XLSF="Standard"
The "Standard" formatting - two decimal places,
thousand and decimal separators will be used according to the Excel defaults
#UR XLSF="#0.00"
Two decimal places, no leading zeros
#UR XLSF="#0.00;[red]#0.00"
Two decimal places, display negative numbers in red
-
If the field contains a format definition, try to look up the format in a
conversion table. A conversion table can be populated programatically when XFRX
is executed so that the formats that are often used and cannot by converted
automatically by XFRX would not require an explicit definition in each field in
the report.
To add an entry to the conversion table, use
addXLSFormatConversion method of XFRXSession class.
Example:
loSession.addXLSFormatConversion("@L 999999.99","000000.00")
-
If the field contains a format definition and it is not listed in the
conversion table, try to convert it. XFRX is able to convert simple format
definitions containing the following characters: '9', '#', ',', '.' and ' '.
For example, 999,999.99 is converted to ###,###.00.
-
If the format cannot be converted, use the implicit XLS numeric format, if
available.
To define the implicit XLS numeric format, call
setDefaultXLSFormat method of the XFRXSession object with the implicit format
as a parameter.
Example:
loSession.setDefaultXLSFormat("General")
-
If the implicit XLS numeric format is not defined, XFRX creates a format
definition to display the same number of decimals as in VFP report output.
If you want to specify that a certain numeric field should be converted
as a text cell in the excel sheet, define "TEXT" as its explicit XLS
numeric format:
#UR XLSF='TEXT'
For a live example of formatting the Excel cells, please have a look at the
"XLS formatted numeric cells sample" report in the demo application.
Version 9.5
Release date: 04/01/2004
Installation note : In order to save reports as pictures, XFRX requires
two additional libraries to be installed:
If you are not planning to export reports as pictures, you can download a
special version of XFRXLIB.FLL (http://www.eqeus.com/files/xfrxlib-nogdiplus.zip),
which doesn't require the two dlls mentioned above.
Bug fixes
-
The problem with bookmark text cutting in encrypted PDF documents has been
fixed.
-
Problem with multiline labels not displayed correctly in the previewer has
been fixed (beta regression).
-
The z-order of rectangles stretching multiple bands has been fixed.
-
Problem with 'print-when' expression not evaluated in certain scenarios has
been fixed.
-
Pictures are now correctly displayed in Word and Excel documents if temporary
path parameter is not empty.
-
Pictures from general fields are now correctly displayed in RTF documents.
-
Problem with blank reports in VFP5 was fixed.
-
The problem with alignment on manually generated reports was fixed.
-
The stability of the XFRX previewer has been improved.
New features
-
BMP, PNG, JPEG, GIF and TIFF output formats were added.
-
The report previewer can be localized. Currently available localizations are:
French, Czech and you can also add new localizations yourself.
Exporting reports as pictures
XFRX is able to export individual report pages as BMP, PNG, GIF and JPEG
pictures, multiple pages can be exported to TIFF image format.
The picture generation process is divided into two steps:
-
the report is generate as XFF cursor
-
savePicture method of the XFFWriter class is called to generate the picture
The advantage of this approach is that once the XFF file is generated, it is
very easy to get the page count, generate individual pictures in a cycle, etc.
SavePicture
method saves the report page(s) as a picture.
Syntax:
XFRXWriter::SavePicture(tcFilename, tcType, tnFrom [, tnTo [, tnBpp [,
tnJPEGQuality [, tnThumbnailWidth [, tnThumbnailHeight] ] ] ] ])
Parameters:
tcFilename
The name of the file to be generated.
tcType
The format of the picture to be saved. Currently supported
options are: BMP, GIF, JPEG, PNG, TIFF.
tnFrom
The page number to be saved. If TIFF format is being
saved, the parameter specifies the first page to be saved.
tnTo
If TIFF format is being saved, the parameter specifies the
last page to be saved. Ignored otherwise.
tnBpp
Bits per pixel. Currently supported values are 16 or 24.
tnJPEGQuality
Specifies the JPEG compression quality. The range is from 1 -
the lowest quality to 100 - the best quality. The default value is 0 - default
quality. Ignored for other output types.
tnThumbnailWidth
The width of the output picture in pixels.
tnThumbnailHeight
The height of the output picture in pixels.
If both
tnThumbnailWidth and
tnThumbnailHeight are
omitted, the original page size is used. If only one of the values is sent, the
other one is calculated accordingly.
Return values
0 ... no errors was encountered
-1 ... unknown image format
-2 ... page out of range
If this sounds complicated, please have a look at the example, it is actually
quite simple:
loSession=EVALUATE([xfrx("XFRX#INIT")])
*
* nothing is sent as the file name, so only a memory cursor is created
*
lnRetVal =loSession.SetParams(,,,,,,"XFF")
If lnRetVal = 0
loSession.ProcessReport("invoices")
local loXFF
*
* the finalize method returns a XFFWriter object reference,
* which will used to save the pictures
*
loXFF = loSession.finalize()
LOCAL lnI, lnJpegQuality
lnJpegQuality = 80
*
* loXFF.pagecount contains the number of pages if the report that
* was just generated
*
* we are now going to save all pages one by one as separate jpeg pictures
*
FOR lnI = 1 TO loXFF.pagecount
loXFF.savePicture("page"+ALLTRIM(STR(lnI))+".jpg","jpg",lnI,lnI,24,lnJpegQuality)
ENDFOR
MESSAGEBOX("Pictures saved.")
Endif
XFRX report previewer localization
Each localization is stored in two files:
-
XFRXLIB_<localization_code>.dbf - strings translation
-
XFRXLIB_<localization_code>.vcx - find and page selection dialogs
localization
To create a new localization, please follow these steps:
-
Choose a code for your localization (e.g. DE for German)
-
Create a copy of default localization DFB (localization\default\XFRXLIB_XXX.DBF
(+CDX, +FPT)). Change the suffix according to your localization code. The
default localization DBF contains English strings that need to be translated.
-
Create XFRXLIB_<localization_code>.vcx visual class library using
localization\default\locClass.prg. Send the localization code as a parameter.
Example: Copy locClass to the XFRXLIB directory and call:
do locClass with "DE"
which will create the XFRXLIB_DE class library.
Translate the two dialog classes in the class library.
-
Copy the localization files to XFRXLIB directory.
To activate the localization in your code, call setLanguage method of XFCont
class. Send the localization code as a parameter.
Example: this.cntXFRX.setLanguage("DE")
Version 9.0
Release date: 01/03/2004
Please note we have added a new library that is required for XFRX to run:
XFRXLIB.FLL. Please copy XFRXLIB.FLL to the same directory where HNDLIB.DLL and
ZLIB.DLL are.
Bug fixes
< LI> '<' and'>' are now handled correctly in Word output
-
SEEK function now works correctly in print-when condition
-
the data environment procedures in built-in reports are now processed correctly
-
'HTML' filename extension is now correctly recognized
-
the session temporary directory is now deleted in session object destroy method
New features
-
XFRX is now able to export and import XML
-
XFRX now natively supports RTF. The RTF documents are generated directly in
XFRX, no third party software - e.g. MS Word - is required.
-
major speedup (around 300%) in transforming reports to the XFRX previewer
(container bar) and in previewing of XFF files
-
The report generation process speedup (around 30%)
-
Major speed increase in processing unformatted numeric values in VFP5, VFP6 and
VFP7.
-
the XFRX previewer can now handle an unlimited number of pages (the only
limit is the disc space)
Version 8.3
Release date: 11/10/2003
Bugs fixes
-
Problem with PDF font embedding into encrypted documents has been fixed
-
THISFORM is now supported in variable init values and FOR and WHILE clauses
-
'lines are printed black' problem has been fixed in HTML
-
the XLS generation process now doesn't display any dialog windows when "SET
SAFETY" if on
-
Problem with pictures in PDF library has been fixed
New features
-
PDF Library now supports picture and text rotation and font embedding
-
Automatic font embedding on Latin2 character can now be switched off (it is not
required in Acrobat 6.0)
To display latin2 characters of some fonts (Times New Roman, Arial, Courier
New) correctly, Adobe Acrobat ver. 5.0 required to embed these characters into
the PDF document. When codepage 1250 was used, XFRX automatically included the
font subsets of these fonts.
Since ver. 6.0, Acrobat displays the characters correctly even if they are not
embedded.
By default, XFRX does embed the characters. If you're using Acrobat ver. 6.0
only, you can made XFRX not embed the fonts by calling:
loSession.setEmbeddingType(0)
Version 8.2
Release date: 10/14/2003
Bugs fixes
-
Problem with digits printed in background has been fixed
-
Problem with money type recognition has been fixed
If you're using versions 8.0 or 8.1, we recommend upgrading to 8.2.
Version 8.1
Release date: 10/14/2003
Bugs fixes
-
fixed the problem with printing group-related variables in page footer
-
font embedding in PDF is now supported in encrypted PDF documents
-
'vertical lines printed slanted' problem has been fixed
-
fixed problem with variables not incremented in summary reports
-
hndlib.dll version is now being check at XFRX startup
Please note that there is updated HNDLIB.DLL in this version. If this version
of XFRX is run with the previous version of HNDLIB.DLL, 'old version of
hndlib.dll" error message is displayed.
We'd like to apologize for the 'vertical lines printed slanted' bug. If you're
using version 8.0 and have vertical lines in your reports, we recommend
upgrading to 8.1.
Version 8.0
Release date: 10/04/2003
Bugs fixes
-
SKIP command during the report generation is now supported
-
Confirm Conversions flags is now being switched off automatically when
generating Word documents
-
Problem with temporary directories being left has been fixed
-
Slanted lines are now supported
-
Problem with Page Footers variables in XLS output has been fixed
New features
-
The preview container now supports bookmarks and hyperlinks
-
XFRX is able to save the generated report to a file and preview it or transform
it to any of the target formats (PDF, Word, HTML, Excel) any time later.
Please see our Saving generated reports
tutorial and also the demo previewer in the
evaluation version.
Version 7.1
Release date: 9/22/2003
Bugs fixes
-
Start group in new column checkbox is now suppported
-
Column footer were incorrectly placed in DOC and HTML
-
Page orientation setting is now supported in XLS
-
Numeric fields are now converted to numeric cells in XLS output
-
Bitmap and JPG pictures in general fields are now supported in XLS and object
container
-
Page headers and footers are suppored in summary page (new feature in VFP 8)
-
Major speedup of container object
-
Problem with security warning in Excel XP version has been fixed
-
fixed the problem with missing pictures in DOC output when temporary directory
was used
New features
New features in the container object
| |
-
added ability to search the report
-
mouse-wheel is now supported
-
mouse middle button is now supported
-
right-click menu was added
-
new toolbar
-
major scroll speed increase
-
and much more is going to come soon :)
|
Bookmarks in HTML output
| |
XFRX can now optionally generate bookmarks (outlines) into the result document.
Please see Creating
bookmarks (document outline) section in XFRX manual to see how to
define a bookmark.
To enable bookmarks in the HTML output, call
loSession.SetOtherParams("PRINT_BOOKMARKS",.t.)
before calling loSession.ProcessReport()
With bookmarks enabled, XFRX will generate three HTML pages: the main page
defining the page frames, the bookmark page and the page with the report
output.
|
XLS cells adjustment
| |
When XLS document is generated, vertical and horizontal coordinates of objects
are adjusted - if the difference between two coordinates is smaller than a
certain value, the coordinates are 'aligned'. This approach significantly
reduces the number of rows and columns in the generated document.
Now it is possible to define this minimal different. The greater the number is,
the lesser number of rows/columns is generated, but if the number is too big,
fields might get overlapped and could be left out.
Call SetOtherParams method with "HORIZONAL_ADJUSTMENT" or "VERTICAL_ADJUSTMENT"
to define the minimal horizontal and/or vertical difference.
Example:
loSession.SetOtherParams("HORIZONTAL_ADJUSTMENT",1000) && default value = 76
loSession.SetOtherParams("VERTICAL_ADJUSTMENT",1000) && default value = 180
|
Pictures rotation in PDF
| |
Pictures now can be rotated the same way as text fields. Please see
Object rotation in PDF chapter in the manual to see how to define the
rotation.
|
Canceling report generation in progress
| |
The generation process in progress can be canceled by setting the global
variable gnStopXFRX to 1. For example, you can, for example, use it this way:
ON KEY LABEL Esc gnStopXFRX = 1
|
Version 7.0
Release date: 8/25/2003
Bugs fixes
-
problem with center alignment has been fixed
-
problem with long detail band wrapping to the new page has been fixed
-
the speed of the generation of reports with numeric fields without format
string has increased in VFP8
New features
Version 6.5
Bugs fixes
-
the database is searched in PATH now
-
problem with rectangle formatting in CNT output was fixed
-
problem with MHT pictures location was fixed
-
problem with rounded rectangles not working with certain regional settings was
fixed
-
header and summary bands now follow the "New page" checkbox
-
problem with incorrect multiline textbox output in Word documents was fixed
New features
Word document splitting
| |
When the generated documents are very long, Word application has problem with
the conversion - it takes very long to convert it. To avoid this problem, XFRX
now can split the generated document into more smaller documents. To set this
up, call SplitDocument() method before calling ProcessReport():
loSession.SplitDocument(tnPages)
tnPagesp is the number of pages each of the resulting documents would have.
|
Printing page ranges
| |
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")
|
User-defined page size
| |
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.
|
HTML page size adjustment
| |
When generating HTML documents, XFRX makes the page a bit shorter by default
(by 1.65 inches). This is because when printing from the Internet Explorer, two
lines are added to the page - at the top and bottom of the page - as header and
footer. By calling ShrinkHeight() method, you can either suppress this
behaviour by calling:
ShrinkHeight(0)
or set your own value by which the page will be shrinked. The unit is Inch *
10000, so to make the page shorter by 2 inches, call:
ShrinkHeight(20000)
The value sent by ShrinkHeight() method is applied to all output types, not
just HTML.
|