• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jasper report- error

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you please share your report1.jrxml file ?
 
Saranya Sivakumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is my report1.jrxml

 
Jigar Naik
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Jigar Naik,

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



added this jar also -
commons-javaflow-20060411.jar
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic