Today had to work on a jasper report that has a IN clause in SQL.
The issue was , that the parameters were taken from UI in CSV format , so couldnt use the $X approach as described
http://stackoverflow.com/questions/6226447/passing-sql-in-parameter-list-in-jasperreport
The solution was
Hope that helps
The issue was , that the parameters were taken from UI in CSV format , so couldnt use the $X approach as described
http://stackoverflow.com/questions/6226447/passing-sql-in-parameter-list-in-jasperreport
The solution was
and in the SQL query use it like
< parameter name="CNTRY_ID" isForPrompting="true" class="java.lang.String" / >
< parameter name="CNTRY_ID_PARSED" isForPrompting="true" class="java.lang.String" >
< defaultValueExpression >< ! [ CDATA [ $P { CNTRY_ID } . replaceAll(",","','") ] ] > < / defaultValueExpression>
where pt.subacct_id = gs.member_id
and gs.CNTRY_ID IN ('$P!{CNTRY_ID_PARSED}')
Hope that helps
No comments:
Post a Comment