Jump to content
JasperReports Library 7.0 is now available ×

In iReport how to reset the counter of a group when there are multiple groups


srikanth.aripirala

Recommended Posts

I would like to display a text at the end of the group data i.e., for the last record in that group.

Example:

I have a data set like below,

BuildingPart FamilyPartTotal
B1CUCUCON10
B1CUCUCON10
B1CUCUCON110
B1ZNZINC20
B2CUCUCON10
B2ZNZINC10
B3CUCUCON10

In case I want the result to be displayed as,

 B1CUCUCON 
 B1CUCUCON 
TotalCUCON  20
     
 B1CUCUCON1 
TotalCUCON1  10
TotalCU  30
     
 B1ZNZINC 
TotalZINC  20
TotalZN  20
TotalB1  50

Further information is that, I have all the data from the query itself i.e., all values including the SUM for each group total are being fetched from query itself and my query is also sorted as Building, Family, and Part. Only grouping has been done via the iReport. Now the data split is correct and grouping correctly as required. But the problem I face is with the Total's because it display at every group split of records i.e., if there is a group split of Part all the 3 totals is displayed which I do not want.

The Total should display based on the Group itself i.e., if there is a change in Part group it should display only the total of the Part not others. In case there is a change in Part Family then it should display only that Group total similarly for Building as well.  

Appreciate your help in this regard

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