Need Reporting Help Please...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need Reporting Help Please...

    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....

    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
    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
    Kevin N. Thompson - Thompson Digital Image
    Quality Manager - Rj Link International

  • #2
    Toggle the values of "PREVIOUS_RUNS=DELETE_INSTANCES" with F7 to "KEEP_INSTANCES" and attach a separate print-command right after
    your UNTIL... with all options OFF (file/printer), but "DELETE_INSTANCES"
    ON.

    That should do the trick!

    Greets

    Comment


    • #3
      What bitsandmore said. The previous runs deletes instances is for looping but only if your rerunning the program for new dimensioning.
      sigpic

      Comment


      • #4
        Thanks guys! I'll change that when I get back to work. I saw that in there, but guess I was thinking it was relating to whether or not it overwrote a file, somehow connected with the OVERWRITE= option... makes sense tho what you guys are saying... guess I need to look things over a bit more carefully. That's what happens on this 'overnight' shift I work I guess... my brain fries pretty quickly!

        Thanks again! You guys are all invaluable (sp?) to me!
        Kevin N. Thompson - Thompson Digital Image
        Quality Manager - Rj Link International

        Comment


        • #5
          ok... I made the change to the code, but it still is doing the same thing. The 'display' in the 'full report mode' edit window blanks after the first 'print/report' command, so any following attempts to print/report yield nothing....

          Here is the changed code:
          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=KEEP_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=KEEP_INSTANCES
              END_CASE/
            END_SELECT/
          UNTIL/C1.INPUT < 1 OR C1.INPUT > 2
          PRINT/REPORT,TO_FILE=OFF,AUTO=1,$
          TO_PRINTER=OFF,DRAFTMODE=ON,$
          PREVIOUS_RUNS=DELETE_INSTANCES
          Any other suggestions?
          Kevin N. Thompson - Thompson Digital Image
          Quality Manager - Rj Link International

          Comment

          Related Topics

          Collapse

          Working...
          X