Hi Rick,
I've got a request for the wwPDF
class. In wwXFRX9, please add a cLogFile
property. The XFRX class has this property and by populating it with a proper file reference it allows enabling runtime logging of any XFRX issues. The other key bit would be setting the property in the PrintReport
method. I can create my own subclass, of course, but think this would be useful to others using XFRX to generate PDFs via WWC apps.
Thanks!
Hi Rick,
Apologies if I'm being a pest. If you can let me know one way or another if you might consider updating wwPDF I'd appreciate it. It's literally 2 lines of code; a property declaration (cLogFile=""
) in the class definition (DEFINE CLASS wwXFRX9 AS wwPDF50
) and a line setting that property in its associated PrintReport method (this.oPDF.cLogfile=this.cLogFile
). Alternatively, creating the oPDF object in the class init instead of in PrintReport would allow manipulating that object prior to calls to PrintReport. Or whatever strategy you think is better.
Thanks again for your time and consideration.
Send me the code. I don't currently have a license for XFRX installed so I can't easily check...
+++ Rick ---
Thanks! Snippets ok?
In the class definition property declarations for
DEFINE CLASS wwXFRX9 AS wwPDF50
*** XFRX Session instance reference
oPDF = NULL
cErrorMsg = []
cOutputName = []
*** Temp directory for work files
cTempDir = GETENV('temp') &&--- Location of where temp files are built.
*** Output type: PDF,HTML,WORD,FWORD,XLS - see XFRX documentation
cTarget = [PDF]
*** Set to .f. if you want to preview the PDF immediately
lNotOpenViewer = .t.
cCodePage = .f.
lSilent = .t.
lNewSession = .f.
cArchive = .f.
lAdditive = .f.
lDeleteFileAfter = .f.
nEmbeddingType = 3 &&--- Partial embedding of fonts.
lSuccessful = .f. &&--- Indicates successful run.
nParamsRetVal = .f. &&--- When numeric, contains value returned when parameters in XFRX are set.
lResetPageNo = .f.
add this property:
cLogFile = ""
In the wwXFRX :: PrintReport
method for this class, directly after
LOCAL cXFRX
cXFRX = [XFRX("XFRX#LISTENER")]
this.oPDF = EVALUATE(cXFRX)
add this:
this.oPDF.cLogfile = this.cLogFile
Thanks I've added this in and it will be in the next release.
I've updated the experimental file, maybe just double check and make sure it works:
+++ Rick ---
Thanks, Rick. Will do.