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. - see to SetReportCache
Font data
- see to SetFDCache
Images data
- see to SetImagesCache
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