>How do I set-up network printers in my program that can be accessed by any user using my foxpro 2.6 report system under the WinNT environment?
>
>For example, users can use any terminal for data entry, but invoices will be printed out in Printer 1 attached to terminal 1, and check vouchers will be printed out in Printer 2 attached to terminal 2, etc.
>
>I am using both VFP 5.0 and Foxpro 2.6 for DOS in my system.
Under NT, shared printers can be assigned to a printer port via the NET USE command. For printing under DOS, you could assign the standard printers to standard ports outside the range of the normal local prts, and then direct print to them using the SET PRINTER TO < port id > command. For example, if the printer on station 1, shared by that station as INVOICES, were to be used, you could say (before the DOS program ran, perhaps as a part of the NT login script)
NET USE LPT4: \\Term1\INVOICES
Whenever your FPD program wanted to print on the invoice printer, you could send printed output to that printer via:
SET PRINTER TO LPT4
VFP has the ability to work with network printers in a more direct fashion; see the help on SET PRINTER TO for VFP; the NAME clause allows you to direct to a network printer, and I believe (I haven't tried this) that you can also direct output to ports mapped via NET USE as well.