mpenumal Posted January 27, 2010 Share Posted January 27, 2010 Hi,I am using i-report 3.7.0 version.Here i have created a parameter and using it in the query part.How can i pass multiple values into the query through that parameter??I am able to pass one value into that parameter.plz help me out.Thanks in advance Code:SELECT product.`product_name` AS product_product_name, sales_fact_1997.`store_sales` AS sales_fact_1997_store_sales, store.`store_name` AS store_store_nameFROM `sales_fact_1997` sales_fact_1997 INNER JOIN `product` product ON sales_fact_1997.`product_id` = product.`product_id` INNER JOIN `store` store ON sales_fact_1997.`store_id` = store.`store_id`where product.`product_name` in ($P{parameter2})Group By product.`product_name`,sales_fact_1997.`store_sales`,store.`store_name`order by store.`store_name`,product.`product_name` Link to comment Share on other sites More sharing options...
randyrhandz Posted January 27, 2010 Share Posted January 27, 2010 Can you just create two parameter instead? or if not you can still pass two values in one parameter. iReport has the capability to tokenize the value in a parameter Link to comment Share on other sites More sharing options...
despec Posted January 27, 2010 Share Posted January 27, 2010 From what I'm slowly understanding, you have to use a special parameter construct using the $X variable, so your IN statement would look like so: where $X{IN,<Fieldname>,<Parameter Name>}Hope this helps. David Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now