×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Printing to Local Printer with Terminal Services

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.

RE: Printing to Local Printer with Terminal Services

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

RE: Printing to Local Printer with Terminal Services

As an alternative to the above, you can simply change the line to read:

SET PRINTER TO "&cPrinterName"

This will translate to:

SET PRINTER TO "EPSON STYLUS COLOR XXX"

Ian

RE: Printing to Local Printer with Terminal Services

(OP)
Ian;

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

No, that isn't the same.  You're missing the quotes.  The difference between yours and mine:

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

(OP)
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.

RE: Printing to Local Printer with Terminal Services

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

RE: Printing to Local Printer with Terminal Services

(OP)
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.

RE: Printing to Local Printer with Terminal Services

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close