Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Progress bar or status bar in forms 6i

Posted on 2004-04-19
Last Modified: 2007-12-19
I have one simple form with single button and display item "status".
 suppose  on when button pressed  triggere  iam selecting all the records from emp table and inserting into  other x_emp table having same structure. during this  phenomenon  i mean to say selecting and inserting process i want to show  the user the progress bar  filled with color.(like 10% completed ...20% completed or simply progress bar ) but progress bar should increase  according to transaction means transaction dependent. . Please send me code with description.
Question by:rehman123

Expert Comment

ID: 10857378

you can create a progress bar using a display item with colour. To simulate progress, you can increase length of display item. Assume that you have a proc Progress(pRatio) to do that.

Code behind your button to load emp x_emp table;


  vCount INTEGER;
  i INTEGER := 0;


  SELECT Count(*) INTO vCount
     FROM Emp;


        vRec.Col1, vRec.Col2, ....);

    i := i + 1;




LVL 22

Expert Comment

by:Helena Marková
ID: 10857418
Here is Note:216479.1 from MetLink:

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
     :t_status := '0%';

e) prog_bar_step

 PROCEDURE prog_bar_step  IS
   a  number :=:delay;
   :t_status := round(:PARAMETER.PARAM_PERC)||'%';

f)  In the STEP command button when button pressed trigger call the procedure  prog_bar_step;
  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 increment.

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. But Timers are not recommended for the Web forms.

Author Comment

ID: 10857436
can send me code for -----Progress(pRatio) ---
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.


Expert Comment

ID: 10857494
Henka sent :)
LVL 48

Expert Comment

ID: 10857652
In many programs such as installer, you will be able to see a boxindicating what percentage of work
has been done while some process is under way.  For example, while running an installer, a bar appears
that indicates how much installation has been done.  Similarly, you
may want to graphically display in Forms how much work has been done while working on something.  For
example, given that you have queried a set of records, suppose you want to visually indicate how many
of all records have been edited as you edit them one by one.  This bulletin provides a procedure that
you can call in an appropriate
trigger to increase the percent completed indication in such a progress bar.  Note that each time you
call this procedure, you will see the bar increasing in length.  You should be responsible for implementing
a scheme or an algorithm that determines when to call this procedure so that it correctly reflects how
much work has been

1.  Create a non database block.  In it, create 10 non base table display items.  Make each one look
like a little box, all the same size.  Stack the display items in a line.  Next, put 0% and 100% at
the ends of the arrangement.  You can use Format->Alignment option to
make this easier.  Name those items as I1, I2, I3, ... I10.  You will see something like the following
in the layout editor:
(Below, each letter I represents a display item.)

       *    Progress Indicator Bar    *
       *                              *
       *     I I I I I I I I I I      *
       *  0%                     100% *

2.  Create 2 visual attributes, V1 and V2.  Give them different attributes.  Now, assign V1 to the above
display items by default. You may want to make V2 so that items with this visual attribute will display
a red background and foreground.

3.  In a When-New-Form-Instance trigger, use this code:


4.  Create a Forms procedure called INDICATE with the following code:

   PROCEDURE indicate IS
      i  NUMBER;
      IF :global.counter > 10 THEN
         FOR I IN 1..10 LOOP
            SET_ITEM_PROPERTY('i'||to_char(I), VISUAL_ATTRIBUTE, 'V2');
         END LOOP;
      END IF;
         VISUAL_ATTRIBUTE, 'V1');

5.  In an appropriate trigger, execute INDICATE.  Note that each time you call this procedure, one more
display item will change its color, from V1 to V2.  When all items have changed their color, they will
change their color back to V1.  Therefore, code in your trigger when
to call this PROCEDURE so that it correctly indicates the amount of work that has been done.  See the
example below.

Suppose you have retrieved 10 records in the block and will be editing each record.  Now, you want a
visual indication of how much editing has been done in terms of the number of records.  This is really
simplistic, but it will explain the usage concept.  In this case, you can create a Key-Down trigger
that calls INDICATE.  As you edit each record and go down to the next record, you will see the progress
bar changing its color, properly indicating the amount of work finished.
Likewise, if you have a total of x number of queried records, you can keep a running total of the number
of records edited using a global variable then call INDICATE after you know that a certain percentage
of records have been edited.  You can use the same kind of scheme in a
Post-Query trigger to reflect the total number of records that have been displayed out of the total
records to be fetched.  You can obtain the total by using COUNT_QUERY built-in.

Accepted Solution

annamalai77 earned 500 total points
ID: 10857658
hi there

musdu method is a proven method and a good one to. i have implemented one like that in my application.


Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
su - oracle could not open session 6 95
Oracle SQL - Query help 7 66
Help on model clause 5 37
oracle DR - data guard failover. 18 45
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question