Home » Developer & Programmer » Forms » Scrollbars and a single clob
Scrollbars and a single clob [message #602000] Thu, 28 November 2013 08:08 Go to next message
philquinn
Messages: 6
Registered: November 2013
Junior Member
Hi,

I'm a Business Analyst trying to help a colleague out.

We have a form which displays the contents of one single CLOB. If the CLOB contains a lot of text, then a scrollbar allows scrolling through the text.

Problem is, when we invoke the form, the scrollbar is always at the bottom of the text,i.e., the end of the contents of the CLOB.

Is there a way to force the scrollbar to the top, thus displaying the 'start' of the contents of the CLOB?

Many thanks.

Phil.
Re: Scrollbars and a single clob [message #602001 is a reply to message #602000] Thu, 28 November 2013 08:41 Go to previous messageGo to next message
cookiemonster
Messages: 13923
Registered: September 2008
Location: Rainy Manchester
Senior Member
how is the clob populated?
directly via query functionality or programmatically?
Re: Scrollbars and a single clob [message #602002 is a reply to message #602001] Thu, 28 November 2013 09:26 Go to previous messageGo to next message
philquinn
Messages: 6
Registered: November 2013
Junior Member
We have a table of notes against an entity (mortgage)

Each row has a unique ID and a CLOB

When we display all the notes for a mortgage, we concatenate all the clobs into one single clob and display that.

We don't display the individual CLOBS as we end up with multiple mini scroll bars per row, which looks terrible

[Updated on: Thu, 28 November 2013 09:27]

Report message to a moderator

Re: Scrollbars and a single clob [message #602003 is a reply to message #602002] Thu, 28 November 2013 09:42 Go to previous messageGo to next message
cookiemonster
Messages: 13923
Registered: September 2008
Location: Rainy Manchester
Senior Member
so programmatically then.
If you don't do that, ignoring the terrible layout for a minute, does the scrollbar start at the top?
Re: Scrollbars and a single clob [message #602004 is a reply to message #602003] Thu, 28 November 2013 10:03 Go to previous messageGo to next message
philquinn
Messages: 6
Registered: November 2013
Junior Member
Will try and get a screenshot
Re: Scrollbars and a single clob [message #602005 is a reply to message #602004] Thu, 28 November 2013 10:16 Go to previous messageGo to next message
philquinn
Messages: 6
Registered: November 2013
Junior Member
http://i669.photobucket.com/albums/vv58/Horace11/notes.png
Re: Scrollbars and a single clob [message #602010 is a reply to message #602005] Thu, 28 November 2013 15:10 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I guess the answer is "no" - according to the third note (as the rest of them are too short), scrollbar is at the bottom, again.

These notes seem to be rather short; how long is the longest one (in characters)? Could you switch to, say, VARCHAR2(4000) column instead?
Re: Scrollbars and a single clob [message #602063 is a reply to message #602010] Fri, 29 November 2013 03:31 Go to previous messageGo to next message
philquinn
Messages: 6
Registered: November 2013
Junior Member
I imagine the notes are short for testing purposes. The likelihood is that notes will be significantly larger. One scenario is that the whole policy document may be cut and pasted in. So unfortunalely, VARCHAR2(4000) is not suitable
Re: Scrollbars and a single clob [message #602079 is a reply to message #602063] Fri, 29 November 2013 04:21 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, back to a single CLOB, then.

Is there any other item in this form? What happens if you click into it, and then click back into a CLOB item? Does it, by any chance, "refresh" and sets focus to the top of it (so that it looks OK)?

Quote:
we concatenate all the clobs into one single clob and display that
How do you do that? In a form, or is there a stored procedure which does the dirty job and just returns the result to a form? If it is in a form, could you post code? Someone might get the idea ...
Re: Scrollbars and a single clob [message #602238 is a reply to message #602079] Mon, 02 December 2013 04:54 Go to previous messageGo to next message
philquinn
Messages: 6
Registered: November 2013
Junior Member
There is a text box which allows entry of a new note. Clicking in this box does not refresh the scroll bar.

The code is done in the form as

PROCEDURE display_rv_notes IS
l_note long;--account_rv_notes.accrvn_note%type;
l_rv_note long;--account_rv_notes.accrvn_note%type;
l_cnt number := 1;
begin
:B7.NB_ACCRV_NOTES := null;
go_block('b7');
execute_query;
first_record;
loop

select to_char(:b7.accrvn_last_change_date,'DD-MON-YYYY')||' '||:b7.accrvn_last_change_by||chr(10)||:b7.accrvn_note
into l_note
from dual;
if l_cnt = 1 then
l_rv_note := l_note||chr(10);
else
l_rv_note := l_rv_note||chr(10)||l_note||chr(10);
end if;
l_cnt := l_cnt + 1;
if :system.last_record = 'TRUE' then
exit;
end if;
next_record;
end loop;
:B7.NB_ACCRV_NOTES := l_rv_note;

end;
Re: Scrollbars and a single clob [message #602336 is a reply to message #602238] Tue, 03 December 2013 04:26 Go to previous message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Could you create a stored (database) function which would do that "concatenation" job, and then - in a POST-QUERY trigger - fetch function's value into a form item? (I'm not saying that it would solve your problem, though; I just don't have any other ideas).
Previous Topic: Forms
Next Topic: FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
Goto Forum:
  


Current Time: Fri May 17 01:16:26 CDT 2024