barteklubocha Posted June 26, 2020 Share Posted June 26, 2020 Hi,I use Jaspersoft Studio, i wanted use collection parameter, i do it in this way: <parameter name="p_aukcje" class="java.util.Collection"> <defaultValueExpression><![CDATA[Arrays.asList()]]></defaultValueExpression> </parameter>When i wanna use collection parameter in query like this :where $X{IN, o.aukcja_id, p_aukcje}my parameter p_aukcje is null, anyone help?But when i display it using textField it is ok, but i query is null Link to comment Share on other sites More sharing options...
jgust Posted June 26, 2020 Share Posted June 26, 2020 Arrays.asList(T..a) takes an array as part of the method. Below is how I use it. Adding One Value<parameter name="p_aukcje" class="java.util.Collection" nestedType="java.lang.String"> <defaultValueExpression><![CDATA[Arrays.asList("* Wszystkie Aukcje")]]></defaultValueExpression></parameter>[/code] Adding Two Values<parameter name="p_aukcje" class="java.util.Collection" nestedType="java.lang.String" evaluationTime="Early"> <defaultValueExpression><![CDATA[Arrays.asList("Łodzie", "Samochody")]]></defaultValueExpression></parameter>[/code] Link to comment Share on other sites More sharing options...
barteklubocha Posted June 26, 2020 Author Share Posted June 26, 2020 I understand, but p_aukcje is what i received from input control (collection) on Jasper Server and i need Array List from received collection i don't want to initilize it in defaultValueExpression "rigidly", In Jasper Studio in section Preview in parametr p_aukcje i add two values for example and i want to initialize arrays these values :) If you know what i mean Link to comment Share on other sites More sharing options...
barteklubocha Posted June 26, 2020 Author Share Posted June 26, 2020 _ 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