d.b Posted January 7, 2015 Share Posted January 7, 2015 Building a report in jaspersoft studio 6.0.1 and pushing to jasperreports server 5.5.0.The portion of query I am trying to get to work is "select state_name, count(1) from sales.by_state where ($P{chosen_states}='ALL' or state_name in ( $P{chosen_states} group by state_name))"I would like to have an input parameter with a list of existing state_names that exist on the by_state table. Also, I would like to add to the checkbox list an "ALL" option which should return everything.Is this possible? ----edit-----I've changed my where clause to where $X{IN,state_name,chosen_states} and se the chosen_states parameter to java.util.List, which seems to help me get a little bit of the way there. Is there a way to dynamically populate the chosen_states with all that show in the query if running everything? Link to comment Share on other sites More sharing options...
d.b Posted January 7, 2015 Author Share Posted January 7, 2015 I was searching for an answer to do it all in Jaspersoft Studio, but I don't know if its possible. This is what I did:Sent report with parameter to jasperreports serverAdded a Query resource that got the distinct list of states from this tableEdited the report's input control to read from the Query created, setting as type Mulit-Select QueryWould there have been a way to do this all in studio? It would be REALLY great to know, because it seems like everytime I update the report in studio and push it to the server, I have to reconfigure the input control. Very annoying! 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