Reputation: 53
Using below, I'm able to change the background color the column in APEX classic report.
#static_id td[headers="TOTAL"]{background: rgb(164, 164, 164) !important;}
How do I change the background color of a row? In this case, I want to change the color of my last row (Totals) Screenshot
Upvotes: 1
Views: 5112
Reputation: 11
Here n=column number, u can simply put this CSS code in inline section
td:nth-child(n)
{
background-color: blue;
}
Upvotes: 1
Reputation: 142720
I don't have Apex 5.1 any more; tested this on apex.oracle.com which currently runs Apex 22.1.0.
Classic report query:
select 1 rn, ename, job, sal
from emp
where deptno = 10
union all
select 2 rn, 'Total', null, sum(sal)
from emp
where deptno = 10
order by rn, ename
Create a dynamic action:
True condition:
Action: Execute JavaScript code
Code:
$('td[headers="ENAME"]').each(function() {
if ( $(this).text() === 'Total' ) {
$(this).closest('tr').find('td').css({"background-color":"red"});
}
});
Affected elements: type = Region, Region = Report1
Fire on initialization: yes
Run the page; the result looks like this:
Upvotes: 5