... lcPrinter = thisform.cboPrinter.value SET PRINTER TO NAME (lcPrinter) REPORT FORM (lcReport) TO PRINTER NOCONSOLE>I have designed a custom printer selection form. I have populated the combo box with the printers as follows:
>lnPrtCnt = APRINTERS(gaPrinters) > >IF lnPrtCnt > 0 > FOR i = 1 TO lnPrtCnt > this.AddItem(ALLTRIM(gaPrinters[i,1])) > IF UPPER(gaPrinters[i,1]) = lcPrinter > this.Value = gaPrinters[i,1] > ENDIF > ENDFOR >ENDIF >>
>lcReport = ???? * name of report that should be printed >lcPrinter = thisform.cboPrinter.value > >SET PRINTER TO NAME &lcPrinter > >REPORT FORM &lcReport TO PRINTER >>
>SET PRINTER TO NAME GETPRINTER( ) >>and then call the REPORT FORM command I dont get an error and the report prints to the selected printer.