title: Using variables in Conditional Style
body: <p>I have a <em>Title</em> band with a <em>Text Field</em> containing a calculated <em>Variable</em> <code>$V{avg_perc}</code>. The <em>Text Field</em> has the <strong>evaluationTime</strong> set to <strong>Report</strong>, same for the <em>Variables</em> <strong>resetType</strong>. 
  Now I'm trying to set the background color of this field with a <em>Conditional Style</em> but I keep getting an error message saying something like:</p>
  
  <pre><code>Invalid expression: !Double.isNaN($V{avg_perc}) &amp;&amp; $V{avg_perc} &gt;= 0.8
  </code></pre>
  
  <p>I'm doing exactly the same thing with the same <em>Conditional Style</em> in the <em>Column Footer</em> and it works without any problems, even if I set the <strong>evaluationTime</strong> for this field to <strong>Report</strong> too.</p>
  
  <p>After removing <code>!Double.isNaN($V{avg_perc})</code> I don't get an error anymore but the expression still doesn't work. My field stays red which is the basic color when none of the conditions is valid, no matter which value <code>$V{avg_perc}</code> has. It still works in the <em>Column Footer</em>, though. This is my style:</p>
  
  <pre><code>&lt;style name="avg_color" mode="Opaque" backcolor="#FF0000" pdfFontName="Helvetica-Bold"&gt;
      &lt;conditionalStyle&gt;
          &lt;conditionExpression&gt;&lt;![CDATA[$V{avg_perc} &gt;= 0.8]]&gt;&lt;/conditionExpression&gt;
          &lt;style backcolor="#008000"/&gt;
      &lt;/conditionalStyle&gt;
      &lt;conditionalStyle&gt;
          &lt;conditionExpression&gt;&lt;![CDATA[$V{avg_perc} &gt;= 0.6 &amp;&amp; $V{avg_perc} &lt; 0.8]]&gt;&lt;/conditionExpression&gt;
          &lt;style backcolor="#FFCC00"/&gt;
      &lt;/conditionalStyle&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>Used Fields and Variables for this:</p>
  
  <pre><code>&lt;field name="perc" class="java.lang.Double"/&gt;
  &lt;variable name="avg_perc" class="java.lang.Double" calculation="Average"&gt;
      &lt;variableExpression&gt;&lt;![CDATA[$F{perc}]]&gt;&lt;/variableExpression&gt;
  &lt;/variable&gt;
  </code></pre>
  
  <p>Any idea how to get this thing to work? I'm using <em>JasperReports</em> and <em>iReport</em> in version 3.7.4.</p>