I'm working on a report, and I have several parameters that are Multi-Select type parameters that are set up as $X{IN,column_name,parameter_name}, but in my testing when I select a value for the parameter, I'm also getting rows where column_name is null. Is there a way to exclude those values IF the parameter is not empty?
4 Answers:
IF I am understanding you,
If you don't have any values selected then the query returns as if null. I was able to recreate this.
To make the element (let's say a table) not visible if the parameter is null or not set,
Set the table's advanced propertey of print when visible to only display if the parameter has value.
I was able to evaluate the expression correctly by checking if empty:
$P{Parameter1}.isEmpty().toString()=="false"
This effectively only displays the table element if the parameter is not empty.
Thank you both for your suggestions. The issue that I'm having is that when I select values for the parameter, I'm getting those values in the report + the null values, and I only want those values, not the nulls. Perhaps I just don't have my parameter set up properly.