Jump to content
We've recently updated our Privacy Statement, available here ×

Error evaluating expression for Integer.valueOf($P{string})


philipp.fresen
Go to solution Solved by C-Box,

Recommended Posts

hey folks,

i get an evaluation error for parsing a string to an int with "Integer.valueOf(<string-param>)".

<parameter name="s_incident" class="java.lang.String" isForPrompting="false">    <defaultValueExpression>        ![CDATA[new String("")]]    </defaultValueExpression></parameter><parameter name="q_incident" class="java.lang.Integer" isForPrompting="false">    <defaultValueExpression>        ![CDATA[iF($P{s_incident}.trim().length() > 0,Integer.valueOf($P{s_incident}),new java.lang.Integer(0))]]    </defaultValueExpression></parameter>[/code]

the string parameter is used as input control in the JasperReporting Server (i want the field to be blank at the beginning).

the int parameter is used in the sql query.

Hope someone can help me..

best regards, Philipp

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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...