WITH ThisForm *** Save the default printer .cDefaultprinter = SET( 'PRINTER', 2 ) *** Set the combo up to point at the current default printer .cboPrinters.ListIndex = ASCAN( .cboPrinters.aContents, .cDefaultPrinter, -1, -1, 1, 15 ) *** Create the WScript.Network object .oNet = CREATEOBJECT( 'WScript.Network' ) ENDWITHYou can populate a combo box with an array of available printers using code like this in the combo's init():
*** Get the installed printers into the combo box APRINTERS( This.aContents ) This.Requery()Then code like this in the combo's valid:
*** set the default printer to the selected printer
Thisform.oNet.SetDefaultPrinter( This.DisplayValue )
Al that is left is to reset the printer to the original default printer after you print the report.