Buddy,
Here is a snippett of code;
if vout='pdf' the
set v vfile=(srpl(.vfile,'xls','pdf',0))
if vcaption='Client List - Alpha' the
print clilist order by cllast option pdf +
|filename .vfile +
|open on
goto theend
endi
endi
label theend
set v vout=null
recalc variables
Return
I did, however, checked the Recalc Form Variables on Click. Alas, No joy.
Thanks,
Bill
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Walker,
Buddy
Sent: Monday, February 16, 2009 12:14 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Problem printing to PDF file
Bill
Just a thought but try setting your radio button variable to null after
printing the report. Maybe the calling eep in the form is causing the
printing over and over
Buddy
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bill Eyring
Sent: Monday, February 16, 2009 12:12 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Problem printing to PDF file
Dennis
This report is called by clicking a radio button.
Radio Buttons are:
Screen
Printer
PDF
Excel
Word Doc
It is when I click the PDF or Excel or Word Doc button that the report keeps
printing. There are no While loops in the code for any button. If you like I
can post the entire code.
Thanks,
Bill
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dennis
McGrath
Sent: Monday, February 16, 2009 11:48 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Problem printing to PDF file
Is this code called directly by clicking a button, or is it called by some
intermediate code? It sounds like you have an endless loop somewhere that
keeps calling your print routine.
This could be and actual code loop, or it could be one routine that call
another that calls the first in and endless race.
One way to isolate it is to put a pause at the top of your routine that you
have to respond to. This will tell you if the rountine is being called
several times. At least it will help indicate if the problem is in the
routine or elsewhere.
Dennis
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bill Eyring
Sent: Monday, February 16, 2009 10:37 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Problem printing to PDF file
Dennis,
Turn off/turn on did not resolve the problem. I can delete the PDF file via
Windows Explorer with no problem.
Thanks,
Bill Eyring
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dennis
McGrath
Sent: Monday, February 16, 2009 11:14 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Problem printing to PDF file
Bill,
Have you tried powering down and restarting the computer?
When things just don't make sense that is my first debugging option.
That way I do not spend endless hours debugging a problem that is really
caused by hardware/OS hiccups.
Also, check the target pdf file when the computer comes back up. See if you
can delete it.
Dennis McGrath
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bill Eyring
Sent: Monday, February 16, 2009 10:03 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Problem printing to PDF file
Dan,
I've already done that. The trace and debug shows no problems and executes
as expected. I suspect a different problem.
Thanks,
Bill
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dan Goldberg
Sent: Monday, February 16, 2009 10:45 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Problem printing to PDF file
You will need to trace to find your error.
Add this to your eep
Set debug on
Set trace on
This will allow you to go line by line tracing out the error.
Dan Goldberg
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bill Eyring
Sent: Monday, February 16, 2009 7:38 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Problem printing to PDF file
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