Search code examples
javapostgresqljasper-reportsjasperserver

Filtering with IntegerList on JasperServer Reports and Postgres


I'm trying to use parameters in Jasper Reports but I'm getting some difficult using list, more precisely Integer List.

I have a Postgres procedure that receives an integer array as parameter like this query select * from function_x(array[n1,n2,n3]). But I don't know how send this values as a Postgres Array.

I already set the param to Multi Select Query in JasperServer.

Can someone help me? Thanks a lot...


Solution

  • Just added MacGyver:

    <queryString>
            <![CDATA[select * from function_x(array$P!{PARAMETER})]]>
    </queryString>
    

    Postgres accept array[] or {} as array values and the problem is that the Jasper was trying to send [n1,n2,n3] (string) so what I done was concatenate array with [].

    That solved my problem...