Jump to content
Changes to the Jaspersoft community edition download ×

Group by two fields


sulalith

Recommended Posts

Hi:

 

I want to group by two fields instead of one field like below

 

<group name="Group" >

<groupExpression><![CDATA[$F{firstName}]]</groupExpression>

 

Can I write a groupExpression as..

 

<groupExpression><![CDATA[$F{firstName} AND $F{gender}]]</groupExpression>

 

 

Sulalith

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

If I understand correctly, having two subsequent groups should accomplish the same effect:

 

<groupExpression><![CDATA[$F{firstName}]]</groupExpression>

--leave this group empty--

 

<groupExpression><![CDATA[$F{gender}]]</groupExpression>

--show data in second group--

 

This will put all equal firstNames together and then within lists of the same firstName, entries will be grouped by gender.

 

Mike

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