Counter for rows in group

1

I need column with number of row in group.

I made variable $V(counter) with expression $V{counter} and Calculation Сount, but its work only for entire report.

How to make it for count rows in groups?

lafut's picture
12
Joined: Apr 5 2010 - 6:03am
Last seen: 9 years 3 months ago

3 Answers:

3

try this:

calculation type: count
reset type:group
reset group: yuor group name
increment type:none

variable expression: set a string that is unique for a single row... if it isn't unique it works fine too... because "count" counts how many times the expression result is different from null.
for example: $F{NAME}+$F{AGE}.toString()+$F{STREET}.toString()...

 

 

 

______________________________
if it works... KARMA point please!    : ) 

 

slow's picture
891
Joined: Feb 17 2010 - 6:57am
Last seen: 9 years 5 months ago
3

Hi,

you have a build-in variable for your created group: YOURGROUP_COUNT.

HTH

Christina.

ckampshoff's picture
Joined: Sep 23 2009 - 6:25am
Last seen: 8 months 2 weeks ago

This worked for me.

jeffrey.hegeman - 5 years 5 months ago
0

Thanks. I'm stupid :) 

lafut's picture
12
Joined: Apr 5 2010 - 6:03am
Last seen: 9 years 3 months ago
Feedback
randomness