Problem when I run the report

Hello people, I have a big problem. I've a report running from jasper studio ok, but when I execute this from my web application I get this error:

net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : 
Source text : ISODD($V{REPORT_COUNT}).equals(true)
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version using JasperReports Library version 6.3.1  -->
<!-- 2017-08-01T20:40:36 -->
<jasperReport xmlns="" xmlns:xsi="" xsi:schemaLocation="" name="dietaAlumno" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="084d528a-5515-4e6a-a086-abe06d202fd8">
<property name="" value=""/>
<property name="" value="DataAdapter.xml"/>
<style name="estilo">
   <style mode="Opaque" backcolor="#E6F2FF"/>
<parameter name="idAlumno" class="java.lang.String"/>
<parameter name="idDieta" class="java.lang.String"/>
<queryString language="SQL">
  <![CDATA[ SQL ....;]]>
Somebodey knows where is the problem ??
Thanks for all.
dcdacd's picture
Joined: Dec 6 2015 - 11:41pm
Last seen: 4 months 2 weeks ago

2 Answers:

Try replacing your condition to ($V{REPORT_COUNT} % 2) == 1

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago
Thanks for your answer, but it not fine: 
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. Invalid digit (valid ones are 0..9)
                value = (((java.lang.Integer)variable_REPORT_COUNT.getValue())%2)==1; //$JR_EXPR_ID=22$
I write some as this:



<style mode="Opaque" backcolor="#E6F2FF"/>


But I'm reading by the iNet and I try to change the las number 1 by 0 and its works fine.
Thanks for all !!!! 
dcdacd's picture
Joined: Dec 6 2015 - 11:41pm
Last seen: 4 months 2 weeks ago