XFRX version 9.6
Release date: 05/24/2004
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
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
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
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.
#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.