Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to change column's color on Interactive report

user7911366Jun 17 2021

How to set the foreground and background colors of a column in an interactive report based on table, according to variable values of one or more columns?
You cannot use the IR Highlight Item functionality as the values can change and therefore would have to keep resetting.
Scenario : I created in a test table 2 more columns with the desired foreground and background colors to facilitate. The region and columns have Static Id for reference. This is the app without color treatment:
image.pngIf I use the Column Formatting HTML Expression property:
<span style="width: auto;color:#FCOLOR#;background-color:#BCOLOR#;">#ID#</span>
The result is:
image.pngIf I change the Column Formatting HTML Expression property to:
<td style="width: auto;color:#FCOLOR#;background-color:#BCOLOR#;">#ID#</td>
The result is:
image.png
image.pngHow to remove or replace this td tag?
I've seen all Oracle tutorials on Javascript and none show how to do this. I've also searched a lot on Youtube but the closest I found was the span tag solution, which doesn't solve my need. In APEX there are several properties for HTML, CSS and Javascript, all without any documentation explaining what they are for and when and how to use them.
Every minute I gained creating the application with low code I now waste days mining information that should be present in the documentation and with easy access and simple and practical examples. For a problem as simple as setting screen item colors in Oracle Forms I just set a property without having to use any undocumented magic tricks...

This post has been answered by user7911366 on Jun 18 2021
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2021
Added on Jun 17 2021
16 comments
17,117 views