XFRX version 14.4

 

Release date: 11 September 2012

New features

  • New output type: Excel plain format (XLSPLAIN)

    The Excel plain output format is an alternative output to Excel that aims to provide cleaner as well as smaller Excel documents. The following are the key differences from the standard Excel output:
    • Each report is generated as a single sheet with a single page header at the top of the document and a single page footer at the very bottom. The header/footer sections are not inserted inside the report where the pages would normally break.
    • The process eliminates empty columns and rows whenever possible.
    • The report layout is automatically adjusted to eliminate narrow rows and columns.
    • HORIZONTAL_ADJUSTMENT and VERTICAL_ADJUSTMENT are no longer needed. The system analyzes the report layout on the fly and identifies the places where objects can be aligned without affecting the final output.

    To invoke the Excel plain format, send "XLSPLAIN" string as the output type parameter. Example (VFP 9.0):

    
    
    LOCAL loObj
    loObj = EVALUATE([XFRX("XFRX#LISTENER")])
    lnRetVal = loObj.SetParams("test.xls",,,,,,"XLSPLAIN")
    IF lnRetVal = 0
       REPORT FORM demoreps\invoices object loObj		
    ENDIF
    

     

    						
  • New previewer extension handler: BeforeExport

    A new extension handler trigger was added: BeforeExport. The method is executed right before the report is exported to the output format and can be used to parametrize the xfrx session object before exporting. Please see more about extension handlers in chapter Registering an extension handler inside the Common methods and properties chapter at Registering an extension handler.

    Example:
    
    
    use demoreps\invoices order customer
    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\invoices 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
    	*
    	loPreview.oExtensionHandler = CREATEOBJECT("SampleExtensionHandler")
    	loPreview.windowtype = 1 
    	loPreview.iTool = 2 && embedded toolbar
    	loPreview.PreviewXFF(loXFF)
    	loPreview.show(1)
    ENDIF
    
    DEFINE CLASS SampleExtensionHandler as Custom
    
    	PROCEDURE BeforeExport
    	LPARAMETERS toSession, toExportParameters
    
    	toSession.setAuthor("Martin") && set the document author property
    	IF toExportParameters.cTarget = "XLS" && (XLS or XLSPLAIN)
    		toSession.SetOtherParams("DISPLAY_GRID_LINES",.F.) && do not display gridlines in excel
    	ENDIF	
    
    ENDDEFINE
    
       

Bugs fixed

  • Excel output type (XLS)
    • Enhanced footer rendering. The system now eliminates vertical gaps between bottom of the page and the page footer
    • 'pos' already exists warning message removed