SQL request problem

0

Hello!

I have a problem with a SQL Request.


SELECT A,
    B,
    C,
    D
FROM `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!

vergnon.corentin's picture
Joined: May 14 2019 - 6:48am
Last seen: 1 week 13 hours ago

1 Answer:

0

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.Collection
In your expression section add following new
ArrayList(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.

joseng62's picture
600
Joined: Dec 5 2014 - 2:43am
Last seen: 5 days 6 hours ago
Feedback
randomness