Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Caching can most improve speed at creating output files in one time. Cache is controled over oXFRX Object.
Cache type are: Report meta data, Font data and Images data.
Caching is disable in default state.

Report meta data

After processing report XFRX don't clear report meta data, but save they to cache.  Report meta data cache is controled by SetReportCache() method.

Font data

After finalize output file XFRX don't clear font data, but save they to cache. Font data cache is controled by SetFDCache() method.

Images data

After finalize output file XFRX don't clear image data, but save they to cache. Images data cache is controled by SetImagesCache() method.

Global and local cache

Cache can be global (on oXFRX Object) or local (on instance of XFRX#INIT or PDFL#INIT) and is controled by SetGlobalCache() method.

LOCAL m.loSession, m.lnRetVal, m.lcFile

USE Customers

m.loSession=EVALUATE([xfrx("XFRX#INIT")])

* Enable report metadata cache
_Screen.oXFRX.SetUseReportCache(.T., .T.)

* Enable font data cache
_Screen.oXFRX.SetFDCache(.T.)

* Enable images data cache
_Screen.oXFRX.SetImagesCache(.T.)

SELECT Customers
SCAN ALL
     m.lcFile="Customer_"+LTRIM(STR(CustNo, 11))+".pdf"
     m.lnRetVal = m.loSession.SetParams(m.lcFile, , , , , , "PDF")
     IF m.lnRetVal = 0
        m.loSession.ProcessReport("report1", , , "NEXT 1")
        m.loSession.ProcessReport("report2", , , "NEXT 1") 
        m.loSession.finalize()
     ELSE
       ? m.lnRetVal, m.loSession.ErrorMessage(m.lnRetVal)
     ENDIF
ENDSCAN

RELEASE m.loSession

  • No labels