Parameter value display all/Multiple?

0

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!

JS-newbie's picture
Joined: Aug 29 2018 - 6:28am
Last seen: 6 months 1 week ago

3 Answers:

0

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.

reportdev's picture
1222
Joined: Oct 12 2015 - 12:05pm
Last seen: 10 hours 53 min ago
0

Have you tried using "size()" to get the number of elements in a parameter?

e.g.

($P{Parameter}.size() == 2) ? "All" : "Multiple"

hozawa's picture
53192
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 1 week ago
0

Thank you hozawa! It worked!

JS-newbie's picture
Joined: Aug 29 2018 - 6:28am
Last seen: 6 months 1 week ago
Feedback