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

ArrayList with Group Reset


markbeardhome

Recommended Posts

Can enyone help me Studio 6.3.1

I have a variable that is collecting information from a field in the main Query, i wish to print data from all the sales items at group level .

using a sub select in the sql will not work doue to other issues with the odbc driver

 

when I run the report I get data that comes after the next Group, group 3 is the sales order number.

I have tried testing the group count, 

java.util.List, java.util.ArrayList and Collection

I get the same results the system seems to add the next data to the  array which is from the next group

 

 

<variable name="orderitems" class="java.util.List" resetType="Group" resetGroup="Group3" calculation="System">
<variableExpression><![CDATA[$V{orderitems}.size() < $V{Group3_COUNT} ? $V{orderitems}.add($F{orderitems})  : $V{orderitems}.add("")
]]></variableExpression>
<initialValueExpression><![CDATA[new ArrayList()]]></initialValueExpression>
</variable>
<variable name="capacity" class="java.math.BigDecimal" resetType="Group" resetGroup="Group3" calculation="Sum">
<variableExpression><![CDATA[$F{capacity}]]></variableExpression>
</variable>
<variable name="volume" class="java.math.BigDecimal" resetType="Group" resetGroup="Group3"/>
<variable name="cost" class="java.math.BigDecimal" resetType="Group" resetGroup="Group3">
<variableExpression><![CDATA[$F{cost}]]></variableExpression>
</variable>
<group name="Group3">
<groupExpression><![CDATA[$F{orderReference}]]></groupExpression>
</group>
</subDataset>

 

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...