Christoph's 2 Cents

A Backup for My Brain!

Oracle Developement

Display Checkmarks for Yes values in APEX report.

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