I have a large VFP application I inherited. There is a function I
made to create a PDF from a report and email the PDF file.
I send the output to a file using the command
REPORT FORM MyReport NOCONSOLE TO FILE MyResultFile.ps
I then use GhostScript to create a PDF. Everything works fine the
FIRST time, but the next time I run the REPORT FORM command, the
output is sent to the default printer and not a file. In trying to
find the problem, I have used DISPLAY MEMORY TO FILE both times to
compare the contents of memory. I have done the same with DISPLAY
STATUS. I do not see any glaring differences that would prevent the
output to a file the second time around. If I exit the application
and reenter each time, the report is sent to a file successfully. It
only fails if I _don't_ exit the application and it only fails after
the first run. I have verified the printer is being set correctly and
the SET('PRINTER', 3) is the printer with the postscript driver.
This definitely seems like a bug in VFP since a file is not created
and the REPORT FORM command should produce a file because of the "TO
FILE".
Any ideas?