...
If this sounds complicated, please have a look at the example, it is actually quite simple:
Code Block | ||||
---|---|---|---|---|
| ||||
loSession= 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 XFRX#DRAW object reference, * which will be used to save the pictures * loXFF = loSession.finalize() LOCAL lnI, lnJpegQuality lnJpegQuality = 80 * * loXFF.pagecount contains the number of pages of 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 |