Web Connection
wwPDF request
Gravatar is a globally recognized avatar based on your email address. wwPDF request
  Richard Kaye
  All
  Mar 14, 2024 @ 09:40am

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!

Gravatar is a globally recognized avatar based on your email address. re: wwPDF request
  Richard Kaye
  Richard Kaye
  Mar 27, 2024 @ 09:18am

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.

Gravatar is a globally recognized avatar based on your email address. re: wwPDF request
  Rick Strahl
  Richard Kaye
  Mar 29, 2024 @ 10:49am

Send me the code. I don't currently have a license for XFRX installed so I can't easily check...

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwPDF request
  Richard Kaye
  Rick Strahl
  Mar 29, 2024 @ 12:05pm

Thanks! Snippets ok?

Gravatar is a globally recognized avatar based on your email address. re: wwPDF request
  Richard Kaye
  Richard Kaye
  Mar 29, 2024 @ 12:17pm

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

Gravatar is a globally recognized avatar based on your email address. re: wwPDF request
  Rick Strahl
  Richard Kaye
  Mar 31, 2024 @ 11:00am

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 ---

Gravatar is a globally recognized avatar based on your email address. re: wwPDF request
  Richard Kaye
  Rick Strahl
  Apr 1, 2024 @ 02:10am

Thanks, Rick. Will do.

Gravatar is a globally recognized avatar based on your email address. re: wwPDF request
  Richard Kaye
  Rick Strahl
  Apr 3, 2024 @ 01:20pm

Confirming that this works as expected. Thanks again.

© 1996-2024