B
Bharat
Guest
Hello Progress Experts!!!
I am trying to display the different colors based on percentage completion in progress bar like percentage 0% - 25% - Red , 25% - 50% - Yellow , 50% - 100% - Green Color.
The concern here is the following codes helps to provide percentage completion in FILL-IN box but I don't know how to give colors.
Note - Color should change and move gradually in FILL-IN box. (like we usually see progress bar in the system while copy and paste into another folder).
I heard we can use .NET methods in progress. It would be better if possible using this.
This may be stupid question(move gradually ) and it might be unviable in progress. Yeah! as you know keep asking question why or why not is good for get some knowledge.
Please throw a small lamp here which gives bright to the dark.
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.
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*/
FOR EACH <table> NO-LOCK:
I = I + 1.
IF I = 1 THEN DO:
RUN UpdateRecord.p (INPUT <table>.<tablefield>)
ASSIGN
iComp = iComp + I.
iPercentage = 100 * (iComp / iRec).
DO WITH FRAME {&FRAME-NAME}:
ASSIGN
/* fiProgress is FILL-IN */
fiProgress:SCREEN-VALUE = STRING(iPercentage) + '%'.
PROCESS EVENTS.
END.
IF iPercentage = 100 THEN DO:
MESSAGE "Record Updation Is completed".
END.
ELSE DO:
I = 0
NEXT.
END.
END.
END.
Continue reading...
I am trying to display the different colors based on percentage completion in progress bar like percentage 0% - 25% - Red , 25% - 50% - Yellow , 50% - 100% - Green Color.
The concern here is the following codes helps to provide percentage completion in FILL-IN box but I don't know how to give colors.
Note - Color should change and move gradually in FILL-IN box. (like we usually see progress bar in the system while copy and paste into another folder).
I heard we can use .NET methods in progress. It would be better if possible using this.
This may be stupid question(move gradually ) and it might be unviable in progress. Yeah! as you know keep asking question why or why not is good for get some knowledge.
Please throw a small lamp here which gives bright to the dark.
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.
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*/
FOR EACH <table> NO-LOCK:
I = I + 1.
IF I = 1 THEN DO:
RUN UpdateRecord.p (INPUT <table>.<tablefield>)
ASSIGN
iComp = iComp + I.
iPercentage = 100 * (iComp / iRec).
DO WITH FRAME {&FRAME-NAME}:
ASSIGN
/* fiProgress is FILL-IN */
fiProgress:SCREEN-VALUE = STRING(iPercentage) + '%'.
PROCESS EVENTS.
END.
IF iPercentage = 100 THEN DO:
MESSAGE "Record Updation Is completed".
END.
ELSE DO:
I = 0
NEXT.
END.
END.
END.
Continue reading...