Create a row grouping in Table Component (Jasper Report)

Posted on by By Nikhilesh, in Business Intelligence, Jaspersoft, Open Source Business Intelligence | 1

Create a row grouping in Table Component (Jasper)

Consider an example currently you are showing the data as shown in below using tabular component.

Make data easy with Helical Insight.
Helical Insight is world’s best open source business intelligence tool.

Get your 30 Days Trail Version

Example:

State Person Name Tax Amount
Iowa PQR 10,000
Iowa XYZ 15,248
Utah ABC 14,245
Utah DEF 13,256
Wisconsin GHI 12,789
Wisconsin JKL 11,100

But If you want to show the data as shown in the table.

State Person Name Tax Amount
Iowa
PQR 10,000
XYZ 15,248
Total 25,248
Utah
ABC 14,245
DEF 13,256
Total 27,501
Wisconsin
GHI 12,789
JKL 11,100
Total 23,889

For this you need to follow these simple steps.

    1. Create a group in the Groups property of data set (This data set is used by table component).
      Say Country is the name of the group and then put the expression.

Note : Sometime in the Jasper Studio 6.0.1 the name of the group does not change in that case you need to keep the by default name to the group.

    1. After creating the Group you can see the two new bands added to table component. You can see in the figure.

groupShow

  1. Create a cell in Group header and put group expression in it (in my case $F{country}).
  2. Make data easy with Helical Insight.
    Helical Insight is world’s best open source business intelligence tool.

    Claim Your 30 Days Free Trail

  3. In order to calculate the total group wise you need to create a variable with reset type your group name (Country) otherwise you will not get the correct result.
  4. Put this variable (say total) in the group footer.

Note: You can create multiple group in a table.

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

0 0 votes
Article Rating
Subscribe
Notify of
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

I have tried,but on generation of report its showing null value.