vergnon.corentin Posted May 14, 2019 Share Posted May 14, 2019 Hello!I have a problem with a SQL Request.SELECT A, B, C, DFROM `Table`WHERE A = 'class'I'm using this in a list. However, the list also returns tuples where A is different of class.When I use this request on my server, it works, so I don't understand why it doesn't work on Jasper.Do you have an idea why do I have this problem please?Thanks a lot and have a nice day! Link to comment Share on other sites More sharing options...
joseng62 Posted May 16, 2019 Share Posted May 16, 2019 Hi vergnon, So need some more info on this one, maybe the log file or stacktrace issues. You tag says studio, so I assume this is happening on studio side ? So regards to WHERE A = 'class' 'class' is a parameter right. If you expect a list, then change this parameter class type to be java.util.CollectionIn your expression section add following newArrayList(Arrays.asList())You can hardcode values if you wish to test filter scenarios on jasperstudio side. i.e.ArrayList(Arrays.asList('value1','value2'))On the sql side you need to use a IN keyword for jasper $X{IN, fieldtofilteragainst, yourparametername}i.e. $X{IN, gender, genderlist}I hope this is what you having issues with. Otherwise just post errors please. 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