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

Error evaluating expression? (JasperServer only)


gundinge

Recommended Posts

Dear all,

I have following problem:
I created a working jrxml in iReport -->
3 input paramater
YEAR, WEEK, COUNTRY (use as a prompt)
and
2 parameter
WHC_COUNTRY, WHC_YEARWEEK (with not use as prompt)

WHC_COUNTRY has follwing default value expression:
( $P{COUNTRY}.isEmpty() == true ? "" :  " and ctry.ek_country = '"+ $P{COUNTRY}+ "' ")

WHC_YEARWEEK has following default value expression:
($P{YEAR}.isEmpty()==true || $P{WEEK}.isEmpty()==true ? "" : " and timeday.ek_calendarweek > '" + $P{YEAR} + $P{WEEK} +"'" )

The Language is "Groovy".
The preview in iReport will work correctly.

After testing I updated it into my JasperServer Instance (via repository navigator) - created all three input controls and run the report. Now I got follwing error msg:

1 - Error evaluating expression : Source text : ( $P{COUNTRY}.isEmpty() == true ? "" : " and ctry.ek_country = '"+ $P{COUNTRY}+ "' ")
java.lang.Exception: 1 - Error evaluating expression :      Source text : ( $P{COUNTRY}.isEmpty() == true ? "" :  " and ctry.ek_country = '"+ $P{COUNTRY}+ "' ")
 at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:403) 
 at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320)
 at com.jaspersoft.ireport.jasperserver.ReportRunner.run(ReportRunner.java:70) ...

what is the error in this default expression (WHC_COUNTRY)? why does it work in case of  running as preview (iReport) and not on JasperServer? (both are 3.7)

Many thanks in advance
best regards

Stefan
 

Link to comment
Share on other sites

  • Replies 1
  • 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...