This topic is locked

change the row color of a report

11/20/2020 4:38:09 PM
PHPRunner General questions
R
RockyMtnHi author

To change the row color of a report, I want to add code like this that I've used on a form to the Before display event. Of course, there is no $data object, so I'm wondering how to do it in a report at run time.
Ideas? Thanks.
--
$dateDue = date($data["DateDue"]);

$currentDate = date("Y/m/d");
if ($dateDue <= $currentDate)

$record["css"]='background-color: #ff0000; color:#fff; font-weight: bold;';

R
RockyMtnHi author 11/25/2020

Is this even possible? I want to change the row color and background color based on the value in the row.