Jump to content
Changes to the Jaspersoft community edition download ×

Recommended Posts

By: Roger Szeto - rszeto1


2002-05-09 14:28

I followed the tips of counting the groups with the following code:


<variable name="GroupCount" class="java.lang.Integer" resetType="Group" resetGroup="MyGroup" calculation="System">



($V{GroupCount} != null) ? (new Integer($V{GroupCount}.intValue() + 1)) : (new Integer(1))




I found that if I have multiple groups, the GroupCount does not reset. It just keep growing.

Does anyone experience the same problem? Is it a bug?



By: Teodor Danciu - teodord

RE: groupcount

2002-05-10 00:06




This is just a trick which is useful

in simple reports.

Is true that when having nested groups

the variable is not reinitialized when

a parent groups breaks.


But a complete control over such a counting

variable you have if you use scriptlets.

There you can increment and reset the variable

as you want.


Good luck!


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