Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Arjun/Sangeeta Yadav
  Where is Arjun/Sangeeta Yadav?
 kolkata
 India
 Arjun/Sangeeta Yadav
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 Tags
Subject: RE: How to list and select Printer
Thread ID: 395916 Message ID: 395939 # Views: 34 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Tuesday, January 21, 2014 5:02:00 PM         
   


> > Hi Experts,
> >
> > There are two printers attached with a system 1. Dot Matrix 2. Inkjet
> > The application has some printing option with dotmatrix and some with inkjet.
> > what i want to acheive is that whenever user select a report a popup list appear with the name of printer
> > like
> > DOT MATRIX
> > INKET JET
> >
> > and upon selection from the listbox/combobox it makes that printer degault and print accordingly.
> >
> > Please help me how to acheive this.
> >
> > any code in this regard will be helpful.
> >
> > Thanks & Regards
>
>
> Hi,
>
> You have two ways to accomplish this . . .
>
> 1. The fully automatic ways. In this way you pre-set in code
> to the correct printer first so that the user cannot by mistake
> select the incorrect printer and print the report.
>
SET PRINTER TO NAME ("MY HP 550X LaserJet")
> REPORT FORM rptMyReport.frx TO PRINTER

>
> 2. The user select way. In this way you popup a dialog
> window for the user to select the correct printer out of.
>
LOCAL lcGetPrinterName
> lcPrinterName = ""
> lcGetPrinterName = GETPRINTER()
> IF .NOT. EMPTY(lcGetPrinterName)
>     SET PRINTER TO NAME (lcGetPrinterName)
>     REPORT FORM rptMyReport.frx TO PRINTER NOCONSOLE
> ELSE
>     Wait Window "Print Job Cancelled!" TIMEOUT 3
> ENDIF

>
> Pete "the IceMan", from the Great White North of Canada.
> www.marathongriffincomputers.com



Thanks for your prompt reply

ENTIRE THREAD

How to list and select Printer Posted by sangeeta yadav @ 1/21/2014 10:54:19 AM
RE: How to list and select Printer Posted by David Mustakim @ 1/21/2014 11:10:02 AM
RE: How to list and select Printer Posted by sangeeta yadav @ 1/21/2014 5:00:45 PM
RE: How to list and select Printer Posted by Tore Bleken @ 1/21/2014 11:14:19 AM
RE: How to list and select Printer Posted by sangeeta yadav @ 1/21/2014 5:01:14 PM
RE: How to list and select Printer Posted by Pete Sass @ 1/21/2014 11:28:37 AM
RE: How to list and select Printer Posted by sangeeta yadav @ 1/21/2014 5:02:00 PM
RE: How to list and select Printer Posted by Paul Gibson @ 1/21/2014 12:56:59 PM
RE: How to list and select Printer Posted by sangeeta yadav @ 1/21/2014 5:02:48 PM