Home » Developer & Programmer » Forms » Problem in Progress Bar
Problem in Progress Bar [message #213551] Thu, 11 January 2007 04:17 Go to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

Hii all

I created a progross bar
and it works fine


but i have a small problem

suppose that i am loading data on my screen form
and while the progress bar is working (e.g i reached 20%)
i change to another window when i return back to the screen
it stop the syncronysing operation and the data is loaded wihout affect on the progress bar and after the end of the operation the progress bar displays (100%)


this is the code that control the operation of the progress bar


Declare
  Previous_Width Number(10,5);
  tm_Name Varchar2(20);
  Vcount1 number;
  Vinc number;
  vREMAINDER3		NUMBER;	
  COUNTER NUMBER := 0;
Begin

Vinc := round(Vcount1/100);
IF (MOD(:SYSTEM.CURSOR_RECORD,Vinc) = 0 ) THEN
   
  Previous_Width := Get_Item_Property('Progress_Bar',Width);
		    
   If counter <= 100 Then
     
       Set_Item_Property('Progress_Bar',Width,  Previous_Width+ (Get_Item_Property('FRAME',Width)/100)));
        :Position := counter   || '%';
        Counter := counter +1;
	        
	 Synchronize;
	
    End If;
END IF;

Re: Problem in Progress Bar [message #213575 is a reply to message #213551] Thu, 11 January 2007 05:42 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It seems that synchronizing is canceled when Forms window lost the focus.

Perhaps you could create a timer which would execute this code in a matter of a second or two (using WHEN-TIMER-EXPIRED trigger).

[Updated on: Thu, 11 January 2007 05:43]

Report message to a moderator

Re: Problem in Progress Bar [message #213587 is a reply to message #213551] Thu, 11 January 2007 06:16 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

I cannot use a timing method because the progress bar is working and progressed according to a number of records
not on a timing
Re: Problem in Progress Bar [message #213595 is a reply to message #213587] Thu, 11 January 2007 06:50 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, but you could DRAW the progress bar every second or two, i.e. call this piece of code (you posted in the first message). It would still calculate percent, but would draw it on screen when timer expired.

At least, I *imagine* that it might work. If not, sorry, but I don't have another idea at the moment (except that you don't open another window until this form finishes its job Smile).
Re: Problem in Progress Bar [message #213787 is a reply to message #213595] Fri, 12 January 2007 05:23 Go to previous messageGo to next message
yogen
Messages: 39
Registered: October 2006
Location: UK
Member
Did you get the solution of the problem..?
Please post it here if you got it...i am also having similar problem but don't have any idea how to deal with it..?
Mad

[Updated on: Fri, 12 January 2007 05:24]

Report message to a moderator

Re: Problem in Progress Bar [message #214050 is a reply to message #213551] Sun, 14 January 2007 01:16 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

Sorry i didnot find the solution yet

I hope that "ORAFAQ" members help us

icon5.gif  Re: Problem in Progress Bar [message #214069 is a reply to message #213551] Sun, 14 January 2007 13:10 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
can you tell me when you are calling this code... I mean you should have put this code in a procedure and calling it on each load of data?
Re: Problem in Progress Bar [message #214080 is a reply to message #213551] Sun, 14 January 2007 19:57 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

emadbsb wrote on Thu, 11 January 2007 10:17

i change to another window when i return back to the screen
it stop the syncronysing operation and the data is loaded wihout affect on the progress bar and after the end of the operation the progress bar displays (100%)



Even if you don't change window, you can still encounter that problem. Synchronize seems not working because the screen display hangs.. I believe it's because the process uses much of cpu resources. after the process, the computer can now refresh the screen so you see it displayed 100%.
Re: Problem in Progress Bar [message #214226 is a reply to message #214080] Mon, 15 January 2007 08:38 Go to previous messageGo to next message
yogen
Messages: 39
Registered: October 2006
Location: UK
Member
hi ,

I am testing this functionality....and i found that this behaviour is very random....sometimes this synchronization stops while sometimes it works fine...are you using any when-window-activated trigger.?
may be this problem is related to this trigger or some global variables which control the navigation condition of various screens.but currently i am not sure about this. Cool
thanks,
Yogen.

[Updated on: Mon, 15 January 2007 08:41]

Report message to a moderator

Re: Problem in Progress Bar [message #214361 is a reply to message #214226] Tue, 16 January 2007 00:44 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Did you search this forum for 'progress'? Have you looked at http://www.orafaq.com/forum/m/126649/67467/?srch=progress#msg_126649 and http://www.orafaq.com/forum/m/120834/67467/?srch=progress#msg_120834 ?

David
Previous Topic: want oracle 9i build internet application(forms9i) ppt
Next Topic: Have Dept and Emp block on form need to delete record on master
Goto Forum:
  


Current Time: Mon Dec 09 21:13:09 CST 2024