php array for $x{in, column, parameter}

Hello

I have the same issue as the user "bartv2000" about 6 months ago. To his question, there is still no reply.

I'm using JasperServer 5.6.0 / Jaspersoft Studio 5.6.0 / REST PHP-Client 2.0.

I would like to pass one parameter with an array of values using the PHP-Client to the Jasper-Report which has a "$X{IN, column, parameter}" SQL-Query.

For example a Jasper-Report SQL-Query:

SELECT * FROM table WHERE $X{IN, id, ID_TABLE}

ID_TABLE is defined as java.util.List as suggested in the manual. I also tried java.util.Collection and java.util.ArrayList which have also worked fine but only in the Jaspersoft Studio.

But how can i pass values in PHP?

PHP-Client example:

$controls = array('ID_TABLE' = array(1,2,3));

$client->reportService()->runReport('/examples/test', 'html', null, null, $controls);

Instead of the expected call to the IDs 1, 2 and 3, the values of the parameter will be ignored and all ID's are listed as if no condition exists..

Thanks for your help.

Regards,
Celestino

celestino's picture
Joined: Jul 9 2014 - 4:14am
Last seen: 5 years 1 week ago

0 Answers:

No answers yet
Feedback
randomness