Using Jaspersoft Studio 6.4.
I am trying to create a java.util.Collection, with nested type java.lang.String.
I want to populate the collection with the values from my data query: iterate through the values of the Field $F{CostCenter} and add each value to my collection. (My query is a domain query).
I have tried
- Creating a collection variable
- Incrementing the variable by my CostCenter group
Adding the field value to my variable
<variable name="dls_CCArray" class="java.util.Collection" incrementType="Group" incrementGroup="CCGroup"> <variableExpression><![CDATA[$V{dls_CCArray}.add( $F{costCenterSet.costCenterConcatenated} )]]> </variableExpression> </variable>
But my variable is null, even though i know my query is returning cost centers.
Reason I need to do this: I have an optional input control. When i select no cost centers, i still need to pass the list of cost center values returned by the query to my next report through my hyperlink parameter.
Thanks in advance