Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing to Local Printer with Terminal Services

Status
Not open for further replies.

ggrewe

IS-IT--Management
Joined
Jul 10, 2001
Messages
169
Location
US
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.
 
Hi,

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
 
As an alternative to the above, you can simply change the line to read:
Code:
SET PRINTER TO "&cPrinterName"
This will translate to:
Code:
SET PRINTER TO "EPSON STYLUS COLOR XXX"
Ian
 
Ian;

Actually, I am already doing what you suggest,

gc_Printer = GETPRINTER()

SET PRINTER TO NAME &gc_Printer

Is that not the same?
 
No, that isn't the same. You're missing the quotes. The difference between yours and mine:
Code:
SET PRINTER TO EPSON STYLUS COLOR
or
Code:
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
 
Thanks Ian, but there still is a problem. I am no longer getting the error loading print drive, but the print job does not go anywhere. If I have the print queue open, the print job shows up and it is listed as being a redirected print job from VFP and Terminal Services, but it does not print.

Thanks for your help so far.
 
Since the print job reaches the print manager, VFP's job is done. As far as VFP is concerned, the document has been printed successfully. Your problem is now with Windows or the printer itself.

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
 
Ian;

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.
 
I have had the same problem with WTS. Here are a couple of things to try.

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top