Hi all,

I just got started using JasperReports and I'm intially stuck on this parameter problem.

I have a report which is just a list of cities and the country they belong to.

I would like to create a list/dropdown parameter so that when the report is run a unique list of all countries available populate the list/dropdown and the user can select to filter the report on the selected country.

My report query is:

SELECT * FROM LOCATIONS WHERE COUNTRY_NAME = $P{COUNTRY_LIST}

I have set up a parameter called COUNTRY_LIST but when I run the report nothing appears in the drop down list, I also included this query in the default parameter value area:

SELECT DISTINCT(COUNTRY_NAME) FROM LOCATIONS

And all I get is a incorrect token errror.

Can this be done in JasperReports?

Please help!

Thanks in advace!

hi

select id, name from customer where name like '$p!{namefilter}%'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.