Jump to content
We've recently updated our Privacy Statement, available here ×

Using java.util.List type parameter in Query


hussainian

Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

afaik, you can accomplish this by using a 'multiple select query' as input control from the JasperServer. Im uncertain this can be done in iReport itself. You should try to get the values from the 'MSQ' in the correct SQL String, which i suppose should look like: "countryA", "CountryB"

perhaps you should use $P!{}

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...