Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLDeveloper 4.1.0.19 result grid determines column-width also on non visable html content

MichaelR64Jun 12 2015 — edited Jun 12 2015

When you use html to format the contents of a query, the grid that displays the results will determine the width of the column based on all of the contents of the cell.

So if the cell contains html like

<html><font color="red">10575</font>

It will use all of the cells content to calculate the width.

See picture:

html sqld.png

Another problem with this is that because the cell contains text as well as numbers, the visible content is left aligned.

When dealing with numbers i need to fix this by inserting &nbsp: into the output.

This causes the cell content to be even bigger.

<html><font color="orange"> 0</font>

Ideally it should look at the visible/rendered content to determine the width.

Also when it does that it should find that ,when only numbers are rendered , the contents are to be right-aligned.

Just like normal numbers.

Code:

select

owner,

case

when  aantal  \< 1000 then '\<html>\<font color="red">'|| replace(lpad( aantal,7 ,'~'),'~', chr(38)||'nbsp;')||'\</font>'

when  aantal  > 1000 then '\<html>\<font color="green">'|| replace(lpad( aantal,7 ,'~'),'~', chr(38)||'nbsp;') ||'\</font>'

end aantal

from

(select owner , count(*) aantal from all_tables group by owner order by 2 desc)

;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2015
Added on Jun 12 2015
9 comments
546 views