Hello All,
I've spent my Presidents Day weekend perplexed and dismayed by a problem I
have printing a simple report to a pdf file.
I have many instances in my program where I print to a pdf file without
problems.
For some reason this report decides it wants to print to a pdf file for as
many times as I let it.
I have checked my code a zillion (okay, many) times. I have checked all my
settings, they remain unchanged from the prior version.
I am using the latest Turbo V8 (8.0.20.30214).
Here is the code I use to produce the report;
--some code
set v vfile text=null
set date for mmddyy
set v vdate=(ctxt(.#date))
set v vdate text
set date for mm/dd/yyyy
--some code
set v vfile=('CliList_'+.vdate+'.XLS')
--some code
if vout='pdf' the
if vcaption='Client List - Alpha' the
set v vfile=(srpl(.vfile,'xls','pdf',0))
print clilist order by cllast option pdf +
|filename .vfile +
|open on
goto theend
endi
endi
--some code
label theend
set v vout=null
--some code
return
When I click to print the report to a pdf file, it executes the above code.
The report prints to the correct filename. When I close the pdf file the
code executes again and will keep re-printing rather then going to my label
THEEND.
If I click on my form Close button to stop the print I get this message
"File could not be created !"
"Possible cause:It could be in use by some other application."
"Solution:Re-try the failed operation after closing the other application or
specify another file name. OK."
This is code I have used over and over with no problems. Can anyone tell me
what the problem could be ?
I have autochked th db and it comes back clean, the settings in my startup
file are unchanged, I am loosing my hair ! Help !
Bill Eyring