Jump to content

Iterate through Array (with <group>)


d.wendler

Recommended Posts

I need to make a report with different chapters like 'browser report' and 'country report'.

I want to loop through an array, make a new page for every chapter and include a sub report in that page for each chapter.

This does not work yet, can you help?

<variable name="chapters" class="java.util.List">
    <variableExpression><![CDATA[java.util.Arrays.asList("browser", "country")]]></variableExpression>
    <initialValueExpression><![CDATA[new java.util.ArrayList()]]></initialValueExpression>
</variable>

 

<group name="ChapterGroup" isStartNewPage="true" keepTogether="true">
    <groupExpression><![CDATA[$V{chapters}]]></groupExpression>
    <groupHeader>
        <band height="20" splitType="Stretch">
        </band>
    </groupHeader>
    <groupFooter>
         <band height="20" splitType="Stretch">
         </band>
    </groupFooter>
</group>

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