Printing to Local Printer with Terminal Services
Printing to Local Printer with Terminal Services
(OP)
I have a VFP 6 application loaded onto a MS W2K Server running Terminal Services. The program runs fine and prints well to any network printer. When I attempt to print to a printer attached locally to the client PC, the print job acts like it is printing, but does not print anywhere. When I modify the program and specify a printer by printer name or by using GETPRINTER(), the program responds with "An Error loading Print Driver".
Any ideas would be greatly appreciated.
Any ideas would be greatly appreciated.
RE: Printing to Local Printer with Terminal Services
Probably your windows printer name have space in.
e.g.
cPrinterName=getprinter()
?cPrinterName =>'EPSON STYLUS COLOR XXX'
set printer to &cPrinterName => error loading...
This is becouse it interpret STYLUS COLOR... as a series of parameters I think...
rename windows printer name to have no space in the name
cPrinterName='EPSON_STYLUS_COLOR_XXX' or
cPrinterName='EpsonStylusColorXXX'
set printer to &cPrinterName
Andrea
RE: Printing to Local Printer with Terminal Services
SET PRINTER TO "&cPrinterName"
This will translate to:
SET PRINTER TO "EPSON STYLUS COLOR XXX"
Ian
RE: Printing to Local Printer with Terminal Services
Actually, I am already doing what you suggest,
gc_Printer = GETPRINTER()
SET PRINTER TO NAME &gc_Printer
Is that not the same?
RE: Printing to Local Printer with Terminal Services
SET PRINTER TO EPSON STYLUS COLOR
or
SET PRINTER TO "EPSON STYLUS COLOR"
VFP will crash on the first line because it doesn't recognize the parameters "STYLUS" or "COLOR". Adding the quotes tells VFP that it's all one name.
Ian
RE: Printing to Local Printer with Terminal Services
Thanks for your help so far.
RE: Printing to Local Printer with Terminal Services
First, double check the basics: Is Pause Printing checked? Is it a network printer? Is there a printer error that hasn't been cleared?
If you print to it from another app, does it print properly?
Ian
RE: Printing to Local Printer with Terminal Services
Every application on the server will print to the local printer but VFP, that is what has me so puzzled. I cannot find any resolution to this problem through Microsoft either. When I talked with Technet earlier this week, it was the first time anyone had reported this type of a problem and they have since gotten back to me and have verified that it happens to them also. So my thinking at this point is that VFP does not like printing through the redirector for some reason or another. I was just hoping there was some other way to make it print.
Thanks for all your help, if you have any other ideas, please let me know.
RE: Printing to Local Printer with Terminal Services
First of all, make sure the driver for your local printer is loaded on the WTS box. If it is, and it is a valid W2K driver, WTS should recognize your printer.
I have also found that W2K does not support many printer drivers that were supported by WIN98 and even NT4.0. In these cases, the NTPRINT.inf file needs to be modified. Find the section [Previous Names] and you should see the following:
; Previous Names
;
; This sections gives previous names for a model. This is currently used only
; for Windows 9x --> Windows NT point and print
;
[Previous Names]
"HP DeskJet 895Cxi" = "HP DeskJet 895C Series Printer"
The left side is a valid name for a driver installed on the WTS box. The name on the right, is the name of the old driver. What this does is tell the WTS box to load the driver on the left when ecountering the driver name on the right. Make sure the name on the left matches exactly with an entry under the OEM's section, in this case [HP]. After doing this, the client machine may encounter a message indicating the signature file has been modified. Just ingnore this and things should work fine.
In the example above, a client PC has an HP DeskJet 895C printer installed. The WTS box has to have the HP DeskJet 895Cxi driver installed.
I have used this method for several printer manufacturers and models, and have had no problems with printing to client's local printers.