I'm trying to pass a parameter from Java to a subreport. The problem is when I got to check all the values inside an IN. The parameter $P{Itens}
is coming on this format(1234,5678,9012) and it's String.
How can I solve it?
I'm trying to pass a parameter from Java to a subreport. The problem is when I got to check all the values inside an IN. The parameter $P{Itens}
is coming on this format(1234,5678,9012) and it's String.
How can I solve it?
You should pass the parameter type as List from Java to report carrying all possible values. Afterwards, edit your report jrxml and set parameter $P{Itens} datatype to java.util.List instead of String.
In report query, replace iae.COD_PECA in $P{Itens}
with $X{IN, iae.COD_PECA, $P{Itens}}
. Here, $X{} is a built-in support provided by JasperReports for SQL clause functions.