Eclipse ERP/Saving file to held Entries or "Report Queue"

From Wikiversity
Jump to navigation Jump to search

Report Queue[edit | edit source]

In Eclipse, sending results of any program or report to report queue is done using the "PRINTER.ON" command. To understand how reporting works, take this example:

          *REPORT QUEUE
** Version# 0.0001 - 07/07/2017 - 02:49pm - USERNAME - eclipse
*** V0.0001 Change - Custom Coding CVY200 - 07/07/2017 - USERNAME - eclipse

*-------------------------------------------------------------------------*
*         This is to test sending report to the Report Queue
*-------------------------------------------------------------------------*

          OPEN 'REALFILENAME' TO FILE ELSE
             STOP
          END

          PGM = 'REPORT_QUEUE'

          TITLE = 'Testing Report Queue for ' : USER.ID
          HDG = 'Report header......................'
          HDG := 'Short Description.................'
          HDR = TITLE:VM:HDG

          PRINTER.ON 'HOLD',TITLE,DOC.ID,HDR

          SELECT FILE
          LOOP
             READNEXT ID ELSE EXIT
             READ DATA FROM FILE,ID ELSE DATA = ''

             PRINT ID      "L#14 ":
             PRINT DATA<1>  "L#100"
          REPEAT

          PRINTER.OFF DOC.ID

          MSG = 'The report is in your Report Queue'
          USR.ID = USER.ID
         !GOSUB SEND.MSG

          RETURN

*-------------------------------------------------------------------------*
SEND.MSG:    *** Send message to user that ran report.
*-------------------------------------------------------------------------*
          SEND.MESSAGE 'Phantom',USR.ID,MSG
          RETURN

*-------------------------------------------------------------------------*


!USERNAME~07/07/17~13:19