This content has been marked as final. Show 8 replies
I don't want to start a "please send it to me", so I'll just lay down the steps:
1. Create a user defined parameter PARAM_PERC and datatype Number, Intial value
as 0 and maximum value as 30
2.Create a control block P_bar below items
a) P_BAR text item Datatype char size 200, Bevel None ,Height 227, Width 11
b) T_STATUS Display item which displays the % on line
c) STEP command button
d) CLEAR Command button
Program Unit Clear
PROCEDURE clear IS
:t_status := '0%';
PROCEDURE prog_bar_step IS
a number :=:delay;
if :PARAMETER.PARAM_PERC >=0 AND :PARAMETER.PARAM_PERC <=100 THEN
:PARAMETER.PARAM_PERC := :PARAMETER.PARAM_PERC +1;
:t_status := round(:PARAMETER.PARAM_PERC)||'%';
f) In the STEP command button when button pressed trigger call the
this will increment the status bar by one step. Depending on the
requirement you can call this in any program unit so that it will
If you want to display a progress bar that executes automatically then
you can create a timer and put the procedure prog_bar_step in that.
Timers are not recommended for the Web forms. You can use a java bean for that.
just to say that I'm happy to hear "I don't want to start a "please send it to me", " !!!
And also that you can use the progress bar java bean available for 6i and 10g
Another but very "basic low budget" solution is to use the status bar
With the following code in the When-Button-Pressed trigger:
Declare LC$C Varchar2(120) := '' ; LN$Num Pls_Integer := 100000 ; LN$Perc Pls_Integer := LN$Num / 100 ; LN$n Pls_integer := 0; Begin Clear_Message ; For i IN 1..LN$Num Loop If mod(i,LN$Perc) = 0 Then LN$n := LN$n + 1 ; LC$C := LC$C || '|' ; Message( Ltrim(To_char( LN$n ) ) || '%' || LC$C, no_acknowledge ) ; synchronize ; End if ; End loop ; End ;
I didn't get this cool one...
But the experience I have is that the status bar is not seen by most of the users...
for example when we have ora- errors we convert them to french friendly messages but how many times did I have a call saying "I'm blocked" and when I come to see it was only to read the message to go on....
But this has not to do with progress bar ..
You're right, but i can say you will see this message because it increase from0% to 100% (so, things are moving on the screen)
That's why I said "cool one".
Before having the progressbar bean I used the set_item_property width to make the thing move...
And I prefer not to talk about an old oracle example (in 4.5 I suppose) of a spinning wheel with 4 images and a canvas moving around... lol ;-)
And I prefer not to talk about an old oracle exampleThat would be nice at this antic time ! ;-)))
(in 4.5 I suppose) of a spinning wheel with 4 images
and a canvas moving around... lol ;-)
I used several times 2 stacked canvases and 2 display items to simulate a progress bar.
Put one display item on each stacked canvas, let the items be of the same size as the canvases and overlay the canvases exactly. Give them different colors and/or attributes. On of the items should by synchronized with the other. Both the display items show the message you want in centered orientation, i.e. "437/1000 (43,7%)" and the topmost canvas adjusts its viewport width to reflect the progress. You need a package with an procedure which initializes the stacked canvases, the message displayed by the items and open / show the "bar". A second procedure is called from within your loop (whatever you do there) to calculate the progress and adapt the canvases and items. The last procedure should reset and close / hide the "bar".
The implementation and code is not so difficult, that you need to post "Please mail me!". Try it yourself, the hints are given.