Search code examples
oracleoracle-apex-5

Oracle Apex 5 how to change cell color in classic report based on cell value


I have a classic report in my APEX app. I need to do something like conditional formatting in Excel - to change background color of cells in one column, based on the value of the cells. I found some tutorials, but all for interactive reports, which didn't work with the classic report. Can anybody help me with that issue?


Solution

  • If you're trying to conditionally color entire rows, you'll probably want the built-in alternative row templates with conditions. It's part of the report template.

    But if you want to format individual cells, the usual way of doing it is to calculate the background color you want in a new SQL column, hide the column, then get the color value using a #COLUMN_NAME# substitution variable. See this article for a simple example, but there are a lot of other examples if you just search for apex conditional cell formatting.