[Stackoverflow] [Progress OpenEdge ABL] PROCESS EVENTS not working inside the OUTPUT TO - PROGRESS 4GL

Status
Not open for further replies.
B

Bharat

Guest
I am using below query to export data. But its not helping me to show the progress completion when its in inside the OUTPUT TO. Cant see the real time update( Gradually percentage increase) in view frame a(Field - cProgress). I m not sure is this possible or is there any other way to achieve this such as showing a dialog box at least if its not possible to see it in field - cProgress in view frame a.

Code:
DEFINE VARIABLE cUserID AS CHARACTER NO-UNDO.
DEFINE VARIABLE iTotalRec AS INTEGER NO-UNDO.
DEFINE VARIABLE cProgress AS CHARACTER NO-UNDO.

DEFINE VARIABLE I AS INTEGER NO-UNDO.
DEFINE VARIABLE iPercentage AS INTEGER NO-UNDO.
DEFINE VARIABLE iComp       AS INTEGER NO-UNDO.
DEFINE VARIABLE iRec        AS INTEGER NO-UNDO.


FORM
 cUser ID COLON 20
 iTotalRec COLON 20
 cProgress SKIP
 WITH FRAME a.

VIEW FRAME a.

ASSIGN
 I     = 0
 iComp = 0
 iRec  = 0
 iPercentage = 0
 .


 /* Calculating Total records*/
  FOR EACH <table> NO-LOCK:
  iRec = iRec + 1.
  END.
  /* Taking each records from the same table to update*/

  OUTPUT TO VALUE ("PATH").
  FOR EACH <table> NO-LOCK:
   I = I + 1.

   IF I = 1 THEN DO:
   /*do some more validations*/
   iComp =  iComp  + I.
   iPercentage  = 100 * (iComp / iRec).
   cProgress = STRING(iProgress) + "%". /*This percentage increase is not gradually raising in 
   view frame a..*/
   PROCESS EVENTS.

    IF iPercentage = 100 THEN DO:
    MESSAGE "Record Updation Is completed".
  END.
  ELSE DO:
    I = 0
    NEXT.
  END.  
  END.
  END.
  OUTPUT CLOSE.

Continue reading...
 
Status
Not open for further replies.
Top