APEX-AT-WORK no image
Tags:

APEX report column with %-sign

Von Tobias Arnhold 5.01.2012
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.  

Update 09.05.2012 You might want to do the same with an Interactive Report then this trick could help you: http://cntrint.blogspot.com.au/2012/05/interactive-report-column-custom.html

Post Tags: