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