Jump to content
Changes to the Jaspersoft community edition download ×

parameter problem


Recommended Posts

hello everyone, i m a new user and start working on the iReports , i faced a little bit problem when i add a new parameter and change the query and want my query select the result based on that parameter value which i set 1 as in the default value box, here is the code that we write in Report Query :


select * from countries

where CountryID=$P{ValueID}


but when i compiled it gives me follwing error :


net.sf.jasperreports.engine.JRException:ÂErrorsÂwereÂencounteredÂwhenÂcompilingÂreportÂexpressionsÂclassÂfile: 1.ÂCannotÂcastÂfromÂintÂtoÂInteger ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂvalueÂ=Â(java.lang.Integer)(1); ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ<--------------------> 2.ÂCannotÂcastÂfromÂintÂtoÂInteger ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂvalueÂ=Â(java.lang.Integer)(1); ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ<--------------------> 3.ÂCannotÂcastÂfromÂintÂtoÂInteger ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂvalueÂ=Â(java.lang.Integer)(1); ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ<--------------------> 3Âerrors ÂÂÂÂ


plz help me , and kindly provide me some good tutorial or share some read material on iReport if u have any.


Thanx in Advance.

wait for reply ....

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...