I'm new to jasper reports. I have created a simple report where data is extracted from a mysql database. No problem.
But when I try to pass parameters to the report where a I want to filter the data with a IN clouse, I allways get all results or an error.
This is my code:
I think you gave the answer yourself, you said ' Parameter_1 is defined as as java.lang.String' and the error sais: ' Invalid type java.lang.String for P1 (..) value must be an array or a collection.'
Can you try to change you parameterer type (can be found in properties of your param) to 'java.util.ArrayList' or 'java.util.Collection'.
That should work, and if you only use Strings in the array/collection, you can define 'Nested subtype' to 'java.lang.String' so you don't have to define the type as well on each object.
Can you let me know if it worked?