I'm placing some code (below) at the end of my programs that takes operator input on whether to send a report to printer, file, or just exit without reporting. It will then loop back and give the operator another chance to send to printer, file or exit (in case they want to print to both, or the printer jammed, etc). It works! Once.
You see, whatever is selected the first time, it does, but after printing to a file or to printer, it then clears the reporting edit window so there's nothing to print if you choose to send to printer or file again before exiting. Is there a way I can prevent it from clearing out the window? Or am I just missing something entirely?
Here is the code I'm using....
I really am open to any and all suggestions on this, if you see something I should be doing differently, better, etc... anything!
Thanks all!
Kevin
You see, whatever is selected the first time, it does, but after printing to a file or to printer, it then clears the reporting edit window so there's nothing to print if you choose to send to printer or file again before exiting. Is there a way I can prevent it from clearing out the window? Or am I just missing something entirely?
Here is the code I'm using....
Code:
COMMENT/DOC,****************************** ,* ,* Print Report Option ,* ,* Give the user the option of (1) Send the ,* report to the printer, (2) Send the report ,* to a file, or (0) No report, and exit. ,* ,****************************************** DO/ C1=COMMENT/INPUT,Choose Report Option: ,1 - Send Report to Printer ,2 - Send Report to .pdf File ,0 - No Report - Exit Program ,Type Number and Press Enter... SELECT/C1.INPUT CASE/1 PRINT/REPORT,TO_FILE=OFF,AUTO=1,$ TO_PRINTER=ON,DRAFTMODE=ON,$ PREVIOUS_RUNS=DELETE_INSTANCES END_CASE/ CASE/2 PRINT/REPORT,TO_FILE=ON,OVERWRITE=\\server\quality\CMM\PC-DMISPrograms\Kevin\cmmreport.pdf,$ TO_PRINTER=OFF,DRAFTMODE=OFF,$ PREVIOUS_RUNS=DELETE_INSTANCES END_CASE/ END_SELECT/ UNTIL/C1.INPUT < 1 OR C1.INPUT > 2
Thanks all!
Kevin
Comment