MACscr Posted November 27, 2007 Share Posted November 27, 2007 I cant for the life of me get table row colors to work. here is a snippet of my report that assigns the colors. Any ideas? if ($percent_used > 90) { $bgcolor = "ff9999"; } elseif ($percent_used > 70 && $percent_used < 1) { $bgcolor = "FFCC00"; } elseif ($percent_used > 50 && $percent_used < 1) { $bgcolor = "fff47f"; } elseif ($percent_used < 50) { $bgcolor = "fff47f"; } else { $bgcolor = "ffffff"; } 0 Quote Link to comment Share on other sites More sharing options...
brianoz Posted November 28, 2007 Share Posted November 28, 2007 The middle cases are wrong, you can't be greater than 70 and less than 1 at the same time, not in this universe anyways I tend to leave off the > 1 stuff, as it doesn't add anything, and just write: if ($percent_used > 90) { $bgcolor = "ff9999"; } elseif ($percent_used > 70) { $bgcolor = "FFCC00"; } elseif ($percent_used > 50) { $bgcolor = "fff47f"; } else { $bgcolor = "ffffff"; } ps: it's always the thing, just need another pair of eyes to catch those pesky bugs ... get it myself all the time! 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted November 28, 2007 Author Share Posted November 28, 2007 brianoz, Looks like i was in the middle of changes when i paste that code. Thanks for pointing that out though. It still doesnt work. Even if i comment out all of that and just put: $bgcolor = "FFCC00"; it still doesnt work. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted December 3, 2007 Share Posted December 3, 2007 As far as I could tell, the $bgcolour in the disk_summary report does nothing, as its not passed onto the row array -so it could well be an unimplemented feature ... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.