Re: Forms 4.5 scrollbar
Date: 1998/09/06
Message-ID: <1998090600434000.UAA03714_at_ladder03.news.aol.com>#1/1
>I am using Oracle Forms 4.5. The form I have looks more like a
>spreadsheet that reads every row out of the database and displays them
>in the form with a scrollbar and it has to do this periodically. The
>problem that I have is in getting the scrollbar tab to reflect the
>correct size of the database. There are many records ( possibly
>650,000) and I don't have the time to fetch all of the records every
>period, but if I don't fetch all of the records, the scrollbar tab size
>does not reflect on the number of records that match the select
>statement. When the operator scrolls down, the size of the scrollbar tab
>changes (it gets smaller every time you scroll down). Is there any way
>I can "trick" the scrollbar without having to fetch all the records?
>
>Any suggestions would be appreciated.
>
>
You have to actually fetch the last record, but not all the ones in between. The most obvious choice is to put a LAST_RECORD; in the POST_QUERY; but remember that the POST_QUERY fires after every row is retrieved. If 20 rows are displayed, you will go to the last record 20 times also. I would recommend using some variables to control this (because they do not get cleared on queries, I recommend using form PARAMETER variables)
Step 1.
Create a form parameter QUERY_LAST_RECORD
Step 2.In the execute_query trigger, set :PARAMETER.QUERY_LAST_RECORD := 'NOT DONE'; Step 3: In the WHEN-NEW-RECORD-INSTANCE, put something like this:
IF :parameter.query_last_record = 'NOT DONE' then
LAST_RECORD;
FIRST_RECORD;
:PARMETER.QUERY_LAST_RECORD:='DONE';
END IF;
I have not tried this, and as I typed it another simpler solution came to
mind...
In the KEY-EXEQRY trigger, put the following:
execute_query;
last_record;
first_record;
Hopefully, one of these will get you on the right track.
Dan Hekimian-Williams Received on Sun Sep 06 1998 - 00:00:00 CEST