Display Checkmarks for Yes values in APEX report.

July 25, 2016 at 1:13 pm | Posted in Oracle Developement | Leave a comment

I have a table with an “active” flag column that stores either Y or N. In an APEX report, rather than displaying the literal letter in an APEX report, I want to display a green checkmark for Y, and a red X for N. To do this, I wrote a couple of custom classes utilizing the Font Awesome icon library.

I placed these two CSS classes into my global CSS file:

.check-Y:before {
 content: "\f00c";
 color: green;
}
.check-N:before {
 content: "\f00d";
 color: red;
}

The values for the content attributes can be gotten from the Font Awesome cheatsheet (ignore the &#X characters).

facheck

In my APEX report ACTIVE column, I added the following HTML Expression:

htmlexpression

When the report runs, the HTML expression will return either check-Y or check-N, thus referencing the classes with the green check mark, or the red X.

report

 

 

 

 

 

Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: