Using java.util.List type parameter in Query

0

Hi!

I was confused where to post this question. whether on Jasper Server, Jasper Report or iReport. So I posted it on all forums.

Coming towards my problem....

I have a report which takes a parameter country_code and displays the city of the given country e.g.

select c.* from city c where c.country_code = decode($P{country_code}, null, c.country_code, $P{country_code})

Using this query, if I'll leave the country_code parameter blank, cities of all the countries are displayed and if I enter some code, cities of that country_code will be displayed.

i.e. the report has two options whether to have a report of all countries or a single country.

I want to add third option i.e. to have the report with cities of any number of countries e.g. User will select three countries and the report showing cities of those three countries will be displayed.

Please tell me how to accomplish this task. Once the issue is solved, i'll tell why Jasper Server is also concerned in this problem.

Thanks & Best Regards.

AsadUllah.

hussainian's picture
Joined: Sep 27 2009 - 10:16pm
Last seen: 4 years 6 months ago

1 Answer:

0
Well The issue solved using the $X{} function.
Thanks.
hussainian's picture
Joined: Sep 27 2009 - 10:16pm
Last seen: 4 years 6 months ago
Feedback