JS-newbie Posted January 4, 2019 Share Posted January 4, 2019 Hello,When we select multiple values for a parameter, instead of showing all the values on the top of the report in a text field, we need to show All or Multiple. How can I achieve this?Thank you! Link to comment Share on other sites More sharing options...
reportdev Posted January 5, 2019 Share Posted January 5, 2019 Try to convert the List or ArrayList parameter object into toString and then use terinary expresssion to compare with All the possible Values for that parameter.But this method will be a problem when you modify the Server Parameter Values. You need to remember modifying the jrxml when you are modifying the Server Parameter Values. Link to comment Share on other sites More sharing options...
hozawa Posted January 6, 2019 Share Posted January 6, 2019 Have you tried using "size()" to get the number of elements in a parameter?e.g.($P{Parameter}.size() == 2) ? "All" : "Multiple" Link to comment Share on other sites More sharing options...
JS-newbie Posted January 9, 2019 Author Share Posted January 9, 2019 Thank you hozawa! It worked! 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