palmtree with sun behind it CONTACT US
Phone: (412) 835-9417
Email: sales@vss3.com

Tip #29 - Printers on a Windows Network

Native32 version of filePro 4.8 or better

This is derived from an Email composed by Wally Turnbull.  Wally has a talent when explaining complex concepts that make them easy to understand.  Thank you, Wally.

Each shared resource on your network/platform has a name by which it is known to the system. The Windows destination for shared printers, for example, is \\servername\printername where servername is the name of the computer sharing the printer, not necessarily a network file server.

Let's say that you have two NT servers called SERVER1 and SERVER2 which share two HP-4000 Laser printers NetPrinter1, Netprinter2, and an HP-8000 laser printer called Netprinter3 connected to them and/or network print servers.

You also have two Windows PCs called MyPC and YourPC that have local HP-895C deskjet printers shared as MyPrinter and YourPrinter.

These five printers are known to your network as:

\\SERVER1\NetPrinter1
\\SERVER1\NetPrinter2
\\SERVER2\NetPrinter3
\\MyPC\MyPrinter
\\YourPC\YourPrinter

These network names are what filePro refers to as the destination. The destination can be set or changed with the environment variable PFPRT. The concept is similar in *NIX but the destination is the *NIX _command_ that you are sending the output to for example "lp -dprinter1 -s". The NativeWin version of filePro permits you to refer to these destinations as "WIN:destination" to use Windows printer spooling.

FilePro also needs to know what type (kind) of printer is to be found at the destination. The types of printers known to your version of filePro are displayed when you press 'S' at the command line in printer maintenance. Valid types are those for which a printer code file exists in the ../lib directory. The filePro type is the name of the file without the extension (prt). The type of printer you want to use can be declared or changed with the environment variable PFPRTC.

Knowing where a printer is on the network and what model it is lets you send reports to the right location in the right format/language for that printer. ** This is all that filePro really needs to know **.

However, in order to make life a little easier for us, filePro lets us list the type of printer that is at each destination and give it a nickname. That nickname/alias is what filePro calls the 'name' in printer definition. That (nick)name is also the name you use if you set PFPRINTER instead of setting PFPRT and PFPRTC.

To print to NetPrinter3 you would set PFPRT=\\SERVER2\NetPrinter3 and set PFPRTC=hp-8000
To print to MyPrinter you would set PFPRT=\\MyPC\MyPrinter and set PFPRTC=hp-895c
To print to NetPrinter1 you would set PFPRT=\\SERVER1\NetPrinter1 and set PFPRTC=hp-4000

** Or **

You could go into printer maintenance and define a printer with the (nick)name N1HP4000 of type hp-4000 at location \\SERVER1\NetPrinter1 and then all you have to do is set PFPRINTER=N1HP4000 and filePro will know both where it is and what it is.

Using the destination command: WIN:\\SERVER1\NetPrinter1 

will use the Windows Spooler to printer the output.  Be careful not to add spaces at the colon or that the names of the printers and computers are typed "exactly" as you see them on the Control Panel list of Printers.

Either method will work. Whether you use one method or the other depends on circumstances and somewhat on preference. If you only have a few shared printers, I think the second method is better. If you have many printers the first is certainly easier to maintain.

Our thanks to Wally for his wisdom. Wally Turnbull can be found at Wallyr@Turnbull.net

Contact Us by: Email to Virtual Software Systems or Phone: (412) 835-9417