Showing posts with label use IN in jasper ireport. Show all posts
Showing posts with label use IN in jasper ireport. Show all posts

Sep 17, 2015

Use IN clause of sql in jasper ireport

Sometime it is necessary to pass IN clause of sql in jasper ireport.

You can use following syntax

select ... where $X{IN, database_column_name, parameter_name}

parameter_name  is a parameter name  of type Collection or array.
Your parameter to be of type java.util.Collection or java.util.List.

database_column_name is database column name.

With the $X{} syntax, the word IN is the name of the function (the other choice is  NOT IN).