user_odoo
user_odoo

Reputation: 2358

Oracle Apex Interactive Report - cell background color

Is it possible remove white space (padding) inside cell?

Query return cell background color like this:

Select
'<span style="background-color: #B8817D">' || col_1 || '</span>' as "1",
'<span style="background-color: #B8817D">' || col_2 || '</span>' as "2",
'<span style="background-color: #F7DC6F">' || col_3 || '</span>' as "3",
'<span style="background-color: #F7DC6F">' || col_4 || '</span>' as "4"
.....

enter image description here

Upvotes: 1

Views: 7529

Answers (2)

Joe Web
Joe Web

Reputation: 716

I'd like to reference to this clean solution from Kutub Tech: youtubecode to be found here

Steps:

  1. Select desired Column > go to "Advanced" > set "Static ID" > set rep_col_diffcolor_1
  2. (optional) Select another Column > go to "Advanced" > set "Static ID" > set rep_col_diffcolor_2
  3. Select Page Root > go to "Inline" > paste the following
.a-IRR-table tr td[headers*="rep_col_diffcolor_1"] {
    background-color: #99ccff;
}
    
.a-IRR-table tr td[headers*="rep_col_diffcolor_2"] {
    background-color: #bfc4c9;
}

Upvotes: 0

davidm
davidm

Reputation: 1760

It requires a bit of hacking, but it should work.

First add this page level inline CSS:

.no-parent-padding {
    padding: 8px;
    margin: -12px -12px;
}

.yellow-background {
    background-clip: content-box;
    box-shadow: inset 0 0 0 12px yellow;
    background-color: yellow;
}

.brown-background {
    background-clip: content-box;
    box-shadow: inset 0 0 0 12px brown;
    background-color: brown;
}

Next the SELECT should look as follow:

select      
    '<div class="brown-background no-parent-padding">'|| 12 ||'</div>' AS "12",
    '<div class="yellow-background no-parent-padding">'|| 2 ||'</div>' AS "2"
....

Finally the result: enter image description here

Upvotes: 4

Related Questions