This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jasper report- error

 
Saranya Sivakumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I need to generate a report as a pdf using ireport through db connection

This is my code...i'm using IDE 6.9


have added these jar files

Jasper.jar
commons-beanutils-1.8.2.jar
commons-collections-3.2.1.jar
commons-digester-1.7.jar
commons-logging-1.1.jar
iText-2.1.0.jar
jasperreports-3.7.1.jar
postgresql-8.4-701.jdbc3.jar
jdt-compiler-3.1.1.jar



error is:

Errornet.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The operator % is undefined for the argument type(s) Integer, int
value = (java.lang.Boolean)(((java.lang.Integer)variable_REPORT_COUNT.getValue())%2 == 0); //$JR_EXPR_ID=10$
<----------------------------------------------------->
2. The operator % is undefined for the argument type(s) Integer, int
value = (java.lang.Boolean)(((java.lang.Integer)variable_REPORT_COUNT.getOldValue())%2 == 0); //$JR_EXPR_ID=10$
<-------------------------------------------------------->
3. The operator % is undefined for the argument type(s) Integer, int
value = (java.lang.Boolean)(((java.lang.Integer)variable_REPORT_COUNT.getEstimatedValue())%2 == 0); //$JR_EXPR_ID=10$
<-------------------------------------------------------------->
3 errors


BUILD SUCCESSFUL (total time: 7 seconds)

can anyone please help in solving this.

Thanks.
 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please share your report1.jrxml file ?
 
Saranya Sivakumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my report1.jrxml

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the issue :



% is not applicable to Integer, convert it into int.

try using

intValue()

 
Saranya Sivakumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i convert it like the code below i'm not able to execute(preview) my report in ireport.



if i remove the jdt-compiler-3.1.1.jar i'm not getting the error which i have mentioned previously but with this


i can't get with this " report1_1281420667859_69790.java "

can you please help me in solving this...
thanks.
 
Saranya Sivakumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Jigar Naik,

Thanks a lot...got it done...



added this jar also -
commons-javaflow-20060411.jar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic