Hi everybody,
I have a report that includes picture in the footer. It uses expression or variable for the source with the following expression
goSig.GetSigFile(SigID)
goSig is a global variable defined in the form that prints that layout. The form uses a timer, in that timer there is first a call to the method that de-crypts the signature data.
The GetSigFile method is the following:
lparameters tnSigID
local lcRetVal
lcRetVal = ""
if m.tnSigID <> 0
this.oSig.SigString = this.cSigData
else
this.oSig.SigString = ''
endif
lcRetVal = this.cTempFilesPath + "\s" + sys(2015) + ".jpg"
clear resources
this.oSig.WriteImageFile(m.lcRetVal)
return m.lcRetVal
I've added clear resources here and in another method just in case.
What we found is that in some cases the previous signature is printed. I am wondering what may be the problem, how unique the file name will be with that method?
What can I do to make sure the file name is always unique and the correct file is always printed? Originally the files were deleted in the scan loop, I moved the deleting of the files outside the loop.
Also, I am using FoxIt PDF driver that pauses after each file printed and displays the file and yet I somehow was able to reproduce the problem.
I also found that the report used the report's variable in the report footer. This variable was not set to be released after report. I am wondering if I can try adding release this variable in the form's code, will it help or not.
Thanks in advance.
If it's not broken, fix it until it is.
My Blog