var rec = 0; function detail_onrender() { debug.print("YAY, rendering " + detail.name()); //detail.objectByName("fldday").setBackgroundOpacity(0); //detail.objectByNumber(1).setBackgroundOpacity(0); rec = rec + 1; //alternate background colour if (rec % 2 == 0) { detail.setBackgroundColor("#eeeeee"); } else { detail.setBackgroundColor("#dddddd"); } var rain = math.value("rainfall"); debug.print ("Value of rainfall is " + String(rain)); //Silly Drawing draw.rectangle(0, 5, math.value("rainfall"), 5, "#000000", "#ffaa00", 1, 128); draw.ellipse(0, 10, math.value("rainfall")/2, 5, "#000000", "#ff00aa", 1, 128); draw.text(0,20, "Hello there"); 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"); } } function foot_day_onrender() { var i=1; for (i = 0; i < 10; ++i) { draw.line(50*i, 0, 50*i + 50, 10, "#00ff00") draw.line(50*i, 10, 50*i + 50, 0, "#00ff") } }