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

No expression for the array constructor call


dolm

Recommended Posts

I'm trying to build a report with cascading paramters and my last parameter that would return a list of managers based on area-managers is causing some issues.

I have a parameter Select_AD_Name_from_list which is populated on jasperserver by a query. This control is working fine in the report.

The second parameter "Select_Manager" is causing issues. When I set it to a string, the dropdown is showing the correct names per the query (which uses $P{Select_AD_Name_from_list} as a filter in the query). The report will try to run if I set this parameter to string, but will fail in the query since it needs $X to populate. But if I set this parameter to a Collection and use the expression

new ArrayList(Arrays.asList(new String[] {“a”}))

It fails to compile with the error:


 
     net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
calculator_AD32Manager32Agent32Drill32Down_1307728316127_643967: 175: No expression for the array constructor call at line: 175 column: 76. File: calculator_AD32Manager32Agent32Drill32Down_1307728316127_643967 @ line 175, column 76.
1 error

What am I doing wrong here?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

 

 

Disregard, I got this woeking by just using the final parameter in my query, so the report is working...

 

I'd still love to know whhy its failing when I try to use $X{param1,param2} with a collection type parameter

Link to comment
Share on other sites

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