> >DEFINE POPUP SetReport SHORTCUT RELATIVE ; > FROM MROW(),MCOL() ; > TITLE "Report Options" MARGIN > >DEFINE BAR 1 OF SetReport PROMPT "Set Printer \<Options" >DEFINE BAR 2 OF SetReport PROMPT "How \<Many Copies?" >DEFINE BAR 3 OF SetReport PROMPT "\<Cancel Printing" >DEFINE BAR 4 OF SetReport PROMPT "\<Select Printer" >ON BAR 4 OF SetReport activate POPUP PickPrinter >DEFINE BAR 5 OF SetReport PROMPT "Send Report to \<Printer" >ON SELECTION POPUP SetReport DEACTIVATE POPUP > >*- begin Select printer from this Pop-up >***************************************************** >LOCAL i, laprinters(1) >DEFINE POPUP PickPrinter SHORTCUT RELATIVE ; > TITLE "Select printer" MARGIN > >FOR m.i = 1 TO APRINTERS(m.laprinters,0) > DEFINE BAR (m.i) OF PickPrinter PROMPT (m.laPrinters(m.i,1)) >ENDFOR >On Selection Popup PickPrinter Set printer to name (Prompt()) >*- end Select printer from this Pop-up > >***************************************************** >DO WHILE .T. > ACTIVATE POPUP SetReport > IF BAR() = 1 > SYS(1037) > ENDIF > IF BAR() = 2 > LOCAL nCopies > nCopies = '' > nCopies = VAL(INPUTBOX("Specify Number of Copies ?","","1")) > IF ! nCopies => 1 > =MESSAGEBOX("Specify Number of Copies as number",0+16,"Error") > KEYBOARD '{M}' > nCopies = 1 > ELSE > nCopies = 1 > ENDIF > _pCopies = nCopies > ENDIF > IF BAR() = 3 > SET DEVICE TO SCREEN > EXIT > ENDIF > IF BAR() = 5 > ** DO PRINTING JOB > EXIT > ENDIF >ENDDO >>
DEFINE POPUP SetReport SHORTCUT RELATIVE ; >> FROM MROW(),MCOL() ; >> TITLE "Report Options" MARGIN >> >>DEFINE BAR 1 OF SetReport PROMPT "Set Printer \<Options" >>DEFINE BAR 2 OF SetReport PROMPT "How \<Many Copies?" >>DEFINE BAR 3 OF SetReport PROMPT "\<Cancel Printing" >>DEFINE BAR 4 OF SetReport PROMPT "Send Report to \<Printer" >>ON SELECTION POPUP SetReport DEACTIVATE POPUP >>***************************************************** >>DO WHILE .T. >> ACTIVATE POPUP SetReport >> IF BAR() = 1 >> SYS(1037) >> ENDIF >> IF BAR() = 2 >> LOCAL nCopies >> nCopies = '' >> nCopies = VAL(INPUTBOX("Specify Number of Copies ?","","1")) >> IF ! nCopies => 1 >> =MESSAGEBOX("Specify Number of Copies as number",0+16,"Error") >> KEYBOARD '{M}' >> nCopies = 1 >> ELSE >> nCopies = 1 >> ENDIF >> _pCopies = nCopies >> ENDIF >> IF BAR() = 3 >> SET DEVICE TO SCREEN >> EXIT >> ENDIF >> IF BAR() = 4 >> ** DO PRINTING JOB >> EXIT >> ENDIF >>ENDDO>>