Hello All,
I am having a mysterious printing issue that has recently popped up. The nut of the issue is that whenever I issue a SET PRINTER TO... command and then a SET DEVICE TO PRINT, I get the "Printer is not ready" error when trying to print using an @ Say command.
This happens in all instances:
1.From my compiled program on any PC (including my development one)
2.From the command line on my development PC
3.When running a program natively on my development PC
I am running Windows XP SP3 and am developing using VFP 9.0 SP2
This was not a problem before, but it has suddenly appeared. I have updated code and recompiled and distributed it before I realized that this printing was an issue. Now all of my computers running the compiled program are experiencing the same issue.
I don't know what has changed or what could possibly have the effect of removing the communication to the printer.
The good news is that it works just fine on another PC (XP SP3, VFP SP2) that I have the development program installed on. It runs the program fine and works fine from the command line. This means that the problem is not the code, but something about VFP on my main development box. From what I can see, both development PCs have the same VFP patch level.
This happens regardless of which printer I choose, a local directly connected printer, one on an IP port, or one of my Netware printers (which is what the program accesses). I can print to any of these from my development PC using any other program. Only VFP is having the issues.
I have been able to get one way to work, but this is not how any of my code is setup:
If I use this code from the command line, I get it to print:
SET PRINTER TO &&clear the printer
SET DEVICE TO screen
SET DEVICE TO PRINTER prompt
@0,1 say 'T'
DISPLAY STATUS
SET DEVICE TO screen
SET PRINTER to
This opens up a connection directly to the printer and holds the printer with a spooling print job until I issue the SET PRINTER TO command which releases the printer. During this time though, the DISPLAY STATUS command shows no printer as being set.
It DOES NOT PRINT when I use the standard code (which my programs have) like this:
SET PRINTER TO \\PGI\QUEUE_3
DISPLAY STATUS &&Shows the printer
SET DEVICE TO printer
DISPLAY STATUS &&Shows the DEVICE = 'print'
@0,1 say 'TE'
CLEAR
DISPLAY STATUS &&Shows the DEVICE = 'scrn'
The printer shows as being set in the first DISPLAY STATUS. The DEVICE shows as "print" after the SET DEVICE command. When I issue the @..SAY command, I get the "Printer is not ready" message box. The DISPLAY STATUS then shows the DEVICE = "scrn".
I still have to check this behavior on my other development box, but it is disturbing that this suddenly crops up out of nowhere.
Any ideas?
Thank you for your help.
Terry