Jump to content
We've recently updated our Privacy Statement, available here ×

Jasper Report treelike structure


george.cristian

Recommended Posts

I have a structure like this:

Category 1 - Name

Category 2 - Name

Category 3 - Name

Ingredient 1 - Price

Ingredient 2 - Price

Category 3 - Total Value

Category 2 - Total Value

Category 1 - Total Value

 

How I defined it, it doesn't print Category 1 - Name and Category 1 - Total Value, because I can't figure out how to print in a recursive manner.

 

In my jrxml I ahve defined 4 fields for the categories: category_name, category_value, imbricated_category_name and imbricated_category_value.

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

In this case you should use data grouping. Create a group for each category type, each group having header and footer. Print the category name in group header, and use report variables to print total values in group footers.

More information about data grouping is available here.

Regards,

Sanda

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