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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Printer

Status
Not open for further replies.

vincentius

Programmer
Feb 11, 2002
17
0
0
ID
Hi All,

How to set the printer device from the script? I used to set the printer from the report File menu | Page Setup. Can I set it through the program?

Thanks,

Vincent.
 
Using APRINTERS() you can get the currently defined printers on a given workstation. With SET("PRINTER",n), where n = 1, 2 or 3, you can determine the Current printer, The Window's Default printer and VFP default printer respectively. Finally with SET PRINTER TO NAME..., you can change the current printer. Is there anything else you need? (Note: This assumes VP 6.0+.)

Rick
 
Don't forget:

SET PRINTER TO NAME GETPRINTER()

GETPRINTER() brings up the same print dialog box as the File->Page Setup menu selections.

Dave S.
 
Hi all,

How to set the page? When I try SET PRINTER TO NAME GETPRINTER() I just can set the printer, not the page.

Thanks,

Vincent.
 
Try the SET PRINTER ON PROMPT statement. However, the page settings contained within the report may override the PROMPT statement. I havene't tested it myself.

Dave S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top