GeeCON Prague 2014*
The moose likes Other Open Source Projects and the fly likes jasper report- error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "jasper report- error" Watch "jasper report- error" New topic
Author

jasper report- error

Saranya Sivakumar
Greenhorn

Joined: Aug 09, 2010
Posts: 13
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

Joined: Dec 12, 2006
Posts: 757
Can you please share your report1.jrxml file ?


Jigar Naik


Saranya Sivakumar
Greenhorn

Joined: Aug 09, 2010
Posts: 13
This is my report1.jrxml

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 757
Here is the issue :



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

try using

intValue()

Saranya Sivakumar
Greenhorn

Joined: Aug 09, 2010
Posts: 13
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

Joined: Aug 09, 2010
Posts: 13
hi Jigar Naik,

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



added this jar also -
commons-javaflow-20060411.jar
 
GeeCON Prague 2014
 
subject: jasper report- error