Jump to content
Changes to the Jaspersoft community edition download ×

Single select querry


javi_123

Recommended Posts

Hi all,

When you add the input control and specify the type as single select query, it does populate all the results in the drop down but if you don't select any value from the drop down list it will display all the results when a user clicks ok. Is it possible to hard code the dropdown to show "All" in the drop down list, so that the user will know that they hav selected all of the results?

Cheers

javi

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I usually do a UNION in my query... something like this:

SELECT '%' AS Value, '  All  ' AS Label

UNION ALL

SELECT MachineName AS Value, MachineName AS Label FROM NC_Workstation

 

Then, in your report query, you would use LIKE:

SELECT *

FROM NC_Workstation

WHERE MachineName LIKE $P{InputMachineName}

 

This blog post has some examples:   http://blog-gabriel.mongefranco.com/2008/07/csv-and-wildcard-searches-in.html

 

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...