Home » Developer & Programmer » Forms » Vertical Scrollbal Issue (Forms 6i, Win7x64)
Vertical Scrollbal Issue [message #465551] Wed, 14 July 2010 12:28 Go to next message
Dysnomia
Messages: 9
Registered: February 2009
Location: Clearwater, FL
Junior Member
Hello,

I am frustrated by the way the vertical scrollbar in forms 6i behaves. If I am dealing with a block with say 100 records and only have 14 displayed when the form is run the size of the scrollbar "bar" is half of the entire scrollbar length. If I scroll to the last record the size of the "bar" decreases by half its original size. It does not become the actual size until all records are displayed.

Now if I have "query all records" set to 'Y' then when the form is run the scrollbar "bar" is appropriately sized based on the total records in the form.

Now there could easily be 1000's of records in this table so I do not want to query all records. I have tried to increase the query array size and # of records buffered but this does not make any difference.

Does anyone have any workarounds to this or am I missing something obvious? Is there some way to size the scrollbar "bar" based on the total count of records when executing the query?

Thanks!
-Theresa
Re: Vertical Scrollbal Issue [message #465554 is a reply to message #465551] Wed, 14 July 2010 13:28 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I very much doubt you've got any way to control this. Suggest you get used to it.
Re: Vertical Scrollbal Issue [message #465555 is a reply to message #465554] Wed, 14 July 2010 13:36 Go to previous messageGo to next message
Dysnomia
Messages: 9
Registered: February 2009
Location: Clearwater, FL
Junior Member
That's what I figured, thanks for your time.
Re: Vertical Scrollbal Issue [message #465631 is a reply to message #465555] Thu, 15 July 2010 01:02 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You could always do 'down' a thousand times, then return to the top row. I doubt that the size of the scrollbar "bar" will change much after that has been done.

David
Re: Vertical Scrollbal Issue [message #465797 is a reply to message #465631] Thu, 15 July 2010 10:58 Go to previous messageGo to next message
Dysnomia
Messages: 9
Registered: February 2009
Location: Clearwater, FL
Junior Member
David, great solution now that's thinking outside the box =) It actually works great!

For anyone who would like to know how I did this:
Added logic to create a new timer in the block's post query. And added a when-timer-expired trigger to the form:

DECLARE
s varchar2(200);
BEGIN
s := get_application_property(timer_name);

IF s = 'QUERY_RECORDS' THEN
GO_BLOCK('PO');
For xx in 1..100 LOOP
IF not :system.last_record = 'TRUE' then
next_record;
end if;
END LOOP;

FIRST_RECORD;
END IF;
END;
Re: Vertical Scrollbal Issue [message #465804 is a reply to message #465797] Thu, 15 July 2010 11:08 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I suspect that might come back and bite you.
Remember that post-query runs for every row retrieved by the query. So if your query returns a lot of rows then:
a) you could have a lot of unnecessary timers.
b) If you haven't set the block to retrieve all rows at once then that timer trigger can actually cause the post-query to fire again as it retrieves more rows from the DB. Which would recreate the timer.
c) If it takes a while to query the data you could very easily have timing issues:
1) Set the timer to too small a time and it could run while oracle is still querying data which could cause all sorts of problems.
2) Set the timer to too large a time and it could run after the user starts modifying data which would really annoy them - If they can't modify data then this is less of an issue.
Re: Vertical Scrollbal Issue [message #465822 is a reply to message #465804] Thu, 15 July 2010 12:00 Go to previous messageGo to next message
Dysnomia
Messages: 9
Registered: February 2009
Location: Clearwater, FL
Junior Member
Good point cookiemonster. I am currently testing this on a block with 80 records. Below is the logic when I create the timer in the block Post-Query, I first check to make sure the timer does not exist. I put in some error trapping and we are only hitting the when-timer-expired trigger twice.

I'll run some further testing on a different form with more records but it appears to work alright for now.

DECLARE
temp_timer TIMER;
BEGIN
temp_timer := find_timer('QUERY_RECORDS');

if not id_null(temp_timer) then
return;
end if;
temp_timer := Create_Timer('QUERY_RECORDS', 1 , NO_REPEAT );
END;

Re: Vertical Scrollbal Issue [message #465826 is a reply to message #465822] Thu, 15 July 2010 12:21 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What happens if you modify code you used in a message #465797 (your first timer solution), and - instead of NEXT_RECORDing many times, simply
LAST_RECORD;
FIRST_RECORD;
Would it "fix" scrollbar size issue? (I don't have Forms installation here so I can't try it myself).
Re: Vertical Scrollbal Issue [message #465827 is a reply to message #465826] Thu, 15 July 2010 12:27 Go to previous messageGo to next message
Dysnomia
Messages: 9
Registered: February 2009
Location: Clearwater, FL
Junior Member
@Littlefoot yes that should work but I assume that it would have the same effect as having the block property "Query all records" set to "Yes". What I am trying to avoid is making forms actually query ALL of the records as we have some clients with very large amounts of data so we are trying to find a way to make navigation easier without drastically increasing the time it takes to query.
Re: Vertical Scrollbal Issue [message #465860 is a reply to message #465827] Thu, 15 July 2010 16:09 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK then; another idea: instead of
for xx in 1..100 loop
  next_record; 
end loop;
first_record;
(i.e. looping 100 times)you could do that at once:
go_record(100);
first_record;
Re: Vertical Scrollbal Issue [message #465989 is a reply to message #465860] Fri, 16 July 2010 04:46 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I thought that you would do this in the 'When-New-Form-Instance' and not be using a timer.

David

PS What happens if you do a 'go_record(100)' and there is less than 100 records that can be retrieved?

[Updated on: Fri, 16 July 2010 04:50]

Report message to a moderator

Re: Vertical Scrollbal Issue [message #465997 is a reply to message #465989] Fri, 16 July 2010 05:04 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Nothing happens. Cursor is set to the last record - no (error) message.
Re: Vertical Scrollbal Issue [message #466001 is a reply to message #465997] Fri, 16 July 2010 05:55 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I wouldn't have thought WNFI would be much use for this, doesn't the scroll bar get reset whenever you execute a query?
Re: Vertical Scrollbal Issue [message #466179 is a reply to message #466001] Sat, 17 July 2010 09:13 Go to previous messageGo to next message
Dysnomia
Messages: 9
Registered: February 2009
Location: Clearwater, FL
Junior Member
@Cookiemonster, that is my assumption which is why I put the logic in the Post-Query.
@Littlefoot, I would have thought you would get an error if the block does not have that amt of records but just tried it and it worked as you indicated! Seems a better solution then looping.

[Updated on: Sat, 17 July 2010 09:14]

Report message to a moderator

Re: Vertical Scrollbal Issue [message #466625 is a reply to message #466001] Tue, 20 July 2010 06:51 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
But the 'execute_query' is in the WNFI.

David
Re: Vertical Scrollbal Issue [message #466641 is a reply to message #466625] Tue, 20 July 2010 07:21 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
I can't see anything in this thread that says that.
Re: Vertical Scrollbal Issue [message #466645 is a reply to message #466641] Tue, 20 July 2010 07:24 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I said that.

David
Re: Vertical Scrollbal Issue [message #466649 is a reply to message #466645] Tue, 20 July 2010 07:27 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
If the form executes one query based on parameters that'd work.
If there's an option to go into enter-query mode and execute queries with different criteria I don't see how it helps.
Re: Vertical Scrollbal Issue [message #466658 is a reply to message #466649] Tue, 20 July 2010 07:52 Go to previous messageGo to next message
Dysnomia
Messages: 9
Registered: February 2009
Location: Clearwater, FL
Junior Member
Most of our screens allow for re-querying so while WNFI may work in most cases for us it will have to stay in post-query.
Re: Vertical Scrollbal Issue [message #466776 is a reply to message #466658] Wed, 21 July 2010 01:49 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
'Go_record' is restricted and 'Post-Query' can only handle unrestricted.

David
Re: Vertical Scrollbal Issue [message #466870 is a reply to message #466776] Wed, 21 July 2010 09:38 Go to previous messageGo to next message
Dysnomia
Messages: 9
Registered: February 2009
Location: Clearwater, FL
Junior Member
Which is why I used a timer David.
Re: Vertical Scrollbal Issue [message #467049 is a reply to message #466870] Thu, 22 July 2010 02:31 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Does it only run once?

David
Re: Vertical Scrollbal Issue [message #467067 is a reply to message #467049] Thu, 22 July 2010 03:50 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
We discussed all this back up the thread.
Previous Topic: Geting Remote client ip or last proxy that sent the request
Next Topic: insert into database problem
Goto Forum:
  


Current Time: Fri Sep 20 03:34:46 CDT 2024