Having some problems trying to get multi value list box values to be accepted in the BIRT engine API.
The error I'm seeing is "The type of parameter "EmployeeType" is expected as "Object[]", not "java.lang.String".
I've tried multiple variations in the beforeOpen clause to get it to parse these correctly but it always returns the same error when running the report.
The section of the query where the values need to go looks like where pebempl_stgr_code in (?)
And it should be just a list of comma separated values, but its not working. All the searching I've done comes up with problems from 2011 and prior and I'm out of ideas.
Edit:
1st beforeOpen script tried was this
this.queryText=this.queryText.replace("placeHolder","where pebempl_stgr_code in ('" + params["employeeType"].value.join("','") + "')");
Worked in the built in web viewer, but will not work with the Engine API
Then tried a modified version of this:
var parmcount = params["parmorders"].value.length
var whereclause = "";
if( parmcount > 0 ){
whereclause = " where customernumber in ( ";
}
for( i=0; i < parmcount; i++ ){
if( i == 0 ){
whereclause = whereclause + params["parmorders"].value[i];
}else{
whereclause = whereclause + " , " + params["parmorders"].value[i];
}
}
if( parmcount > 0 ){
this.queryText = this.queryText + whereclause + " ) ";
}
And it works the same way, runs fine in the web viewer, but will not run in the Engine API.