how to pass multi-select parameters to oracle stored procedure

0

Hi,

A parameter named in_Region declared as Collection in i-report and need to pass this parameter to Oracle stored procedure.

in I-report query this is how i call the SP :

{
call REPORT.GetStatistic(
$P{in_Region}, 
$P{ORACLE_REF_CURSOR}
)}
 
in JasperServer , i created Input Control of type Multi-Select Query (Checkbox) 
 
and i got this error when i run in jasperserver
com.jaspersoft.jasperserver.api.JSExceptionWrapper: Report design not valid : 1. Parameter type not supported in query : in_Region class java.util.Collection

any idea?

flubet's picture
2
Joined: Dec 3 2013 - 9:39pm
Last seen: 4 months 1 week ago

1 Answer:

0

You can't use collections with the $P{} parameter reference.

I'm more curious as to how your stored procedure is expecting the values to be given to it? Is it expecting some kind of formatted string of values to parse, or somethign else?

I suspect your solution will require you to have 2 parameters, 1 being a collection, used as an input control to collect your parameters, then another parameter to pass to your stored procedue (in the same way as you've done here with the $P{} use), this would be a string type, and it would have a default value set with some code to take your collection and turn it into whatever your stored procedure is expecting for the input.

cameron_1's picture
178
Joined: May 5 2013 - 8:32pm
Last seen: 1 week 6 hours ago
Feedback