Jump to content
Changes to the Jaspersoft community edition download ×

Jasper report table with subtables


Methos81
Go to solution Solved by reportdev,

Recommended Posts

Hello everyone.

I need help to solve my problem with jasper. Currently i have to generate a jasper report similar to the following table (values are masked for confidential reasons)

index(38).png.c0f5b11b6011bf417fda323207055883.png

The requirement for this table is as follows:

Each row(1) can have sub rows(1.a) (row 1 and 1.a has differnet styles) Each subrows(1.a) has a sub row(1.a.1)(row 1.a and 1.a.1 has different style)

There is a posibility of multiple subrows like 1.a,1.b if there is more than one subrows then i have to sum the total and add another row (with different style)

So i need help for 3 points:

  • How can i set differents styles by row type?
  • How can i add the sub row with total if there are more than 1 subrow?
  • How can i manage sub rows inside a row with jasper?

Thanks for the help.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Solution
  • How can i set differents styles by row type?

one way would be to create a uniqueid in your sql and assign this uniqueid to the conditional expression

  • How can i add the sub row with total if there are more than 1 subrow?

I can think of creating groups for each row and creating variables from the group would create subtotals.

  • How can i manage sub rows inside a row with jasper?

Inside these Row groups, create table elements for Sub rows.

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