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

set printer to getprinter() .... not working

Status
Not open for further replies.

csr

Programmer
Jul 20, 2000
507
I have a situation in which I have several reports which I wish to print without having the user select a printer for each report. I wish to select a printer for the first report and then have all subsequent reports sent to that printer automatically.

set printer to getprinter() would seem to be the ticket.

Unfortunately, it does not work.

Anyone with experience with this who knows what I should be doing to accomplish this ?


Don


 
CSR

Try this way
Code:
lcPrinter=GETPRINTER()
SET PRINTER TO NAME "&lcPrinter" &&use macro sub INTO quotes
REPORT FORM formname TO PRINTER

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Same result.

I have the sense that the printer that the report is going to is the set("PRINTER",3) printer. That is the default Visual Foxpro Printer.

How can I change the Default Visual Foxpro printer ?


Don


 
Hi Don,

What version of VFP? Have you cleared Tag and Tag2 of the report's .frx that stores printer information?

Regards,

Mike
 
csr

this works for me.

Code:
? SET('PRINTER',3)
SET PRINTER TO NAME GETPRINTER()
? SET('PRINTER',3)

Although as mspratt suggest, it might be the info in the TAG fields that is prevent your report to end up at the right printer.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Whoops !

I didn't notice the keyword NAME within the command.
It works now.

Thanks all for your help.


Don


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top