APEXblog.nl - Tips and Tricks

About This Blog:
I (Richard Weug) started this blog primary for myself to save all kinds of Apex tips and tricks in one place. To use it as a place to write down how I used some coding in my own projects, but also to copy and paste all kinds of articles I find on the Internet. (So I never have to wonder on what website did I read about??? When I see something interesting I collect the content so I have my own archive/knowlegde base.

View my profile on LinkedIn

 

Tips & Tricks

Print
01
May

Oracle APEX column with %

Written by Richard Weug. Posted in Tips and Tricks

Or,.. how to format the way an report columns looks,..

If you want to beautify your number column inside an APEX report with a percent-sign then most of you would do like this:
select column_name || '%' as column_name
from my_table


This creates the correct output but the sort will not work anymore as expected because a type conversion will automatically be applied. It is not longer a number column and the sort will be assigned as it would be a character column.
Luckily there is a easy workaround for this. Let the select as it is:
select column_name
from my_table

And add this under the "Column Attributes">"Columns Formatting">"HTML Expression": #COLUMN_NAME#%

That's it.

Original article: Tobias Arnhold

link: http://www.apex-at-work.com/2012/05/apex-report-column-with-sign.html