Jump to content
We've recently updated our Privacy Statement, available here ×

Collection parameter is always null


barteklubocha

Recommended Posts

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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...