function detail_onrender() { debug.print("YAY, rendering " + detail.name()); detail.objectByName("fldday").setBackgroundOpacity(0); detail.objectByNumber(1).setBackgroundOpacity(0); var rain = math.value("rainfall"); debug.print ("Value of rainfall is " + String(rain)); if (rain > 100) { highlightSection() } else { unHighlightSection() } //var x = "Hello There"; //var y = x.substring(4).toLowerCase(); //debug.print(y); } function highlightSection() { detail.setBackgroundColor("#ff7070"); detail.objectByName("fldday").setSource("=\"High Value\""); detail.objectByName("fldday").setLineStyle(constants.QtDashDotLine); detail.objectByName("fldday").setLineColor("#ffffff"); detail.objectByName("fldday").setLineWeight(2); } function unHighlightSection() { detail.setBackgroundColor("#ffffff"); detail.objectByName("fldday").setSource("=\"Day \" + math.value(\"day\")"); detail.objectByName("fldday").setLineStyle(constants.QtNoPen); } function pgfoot_onrender() { pgfoot.setBackgroundColor("#606060"); } function rptfoot_onrender() { if (math.avg("rainfall") > 100) { rptfoot.setBackgroundColor("#ff7070"); } }