Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Force output to selected printer
Message
From
04/09/2003 19:37:26
 
 
To
04/09/2003 18:54:43
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00826239
Message ID:
00826249
Views:
32
Hi Cristóbal;

>How do I force a report to be printed to a specified printer, wich is not the default windows printer nor the one wich was selected at report's design time?
>
>More clearly:
>My program has these lines:
>m.myprinter = "Epson FX-810"
>* I'm sure this one exists since it's returned by aprinters()
>Set printer to name (m.myprinter)
>Report form Myreport to printer
>
>The report is sent to another printer (i.e. "HP 600") wich is the one that was the default printer by the time I designed the report.
>
>My workaround has been to open the report file (use myreport.frx) and clean the contents of the fields Expr, Tag and Tag2 at the first record.
>
>Is there any other way to force the output to (m.myprinter) programmatically?
m.myprinter = "Epson FX-810"
nwqty_prn   = APRINTERS(awprinters)
nwprn       = 0
for i = 1 to nwqty_prn
    if  m.myprinter$upper(awprinters[i,1])
        nwprn = i
        exit
    endif
endfor
if  nwprn > 0
    SET PRINTER TO NAME awprinters[nwprn,1]
endif
HTH

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform