If this is a stand-alone application, and you want to hard-code the printer, and the user will never change printer...You need to find out the port also. You can use ASCAN() to locate the printer you want to use, then determine the port.
APRINTERS(p_printers)
LOCAL lcPrinter,lcPort
lcPrinter=p_printer[1,1]
lcPort=p_printers[1,2]
orep.SelectPrinter(lcPrinter,lcPrinter,lcPort)
? oRep.PrinterName
>Mike,
>
>I want change the PrinterName Property.
>
>Local cDef_printer
>cDef_printer = SET("PRINTER",2) && Or SET("PRINTER",3)
>ocrreport.PrinterName=cDef_printer
>
>I don't Want Dialog Popup before. && SET PRINTER TO NAME GETPRINTER()
>
>How can i do It ?
>
>bernhart