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

Sub table inside a table with sub table in second row


Recommended Posts

Hi Everyone,
I was trying to display a structure like below...

image.png.5d2251de053a511a0c65886fecba98f3.png

Here Main table data source contains list of beans in which each bean has its fields to display in main table and a list of sub table beans in which each bean has its own fields to display in sub table columns.What I have followed is

  • I have used structure in jasper "A Table inside list contents in a List component" by fixing the table headers as text fields and giving them proper widths.
  • And this list will iterate over the text fields(text field in a rectangle which has the same width as text field) in one row and followed by a Subtable in second row.
  • Here a list of beans is being passed to the datasource in which each bean has it's own fields to display in main table detail cells and a list of secondary beans which contains details to be displayed in sub table.
  • If I implement like this I am facing a problem with the text fields since the rectangle height do not get dynamically change with the content in the text field hence the content is being displayed beyond the rectangle height and overlapping with below fields.Attaching a screenshot of the issue.

Can anyone suggest me how to implement this kind of structure or To get rid of the problem if i use textfields to display as table columns ?

image.png.ae4fe2ff82ca5ed1ee7b4efa429791c7.png

Link to comment
Share on other sites

  • 1 year later...
  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 years later...

Hi jivan , Thanks for your response. we have using jasper 4.0.1. We have a use case with render a subtable inside the each rows column cells while export. Is there any way to achieve this without using jr:table component. Because we will export the columns dynamically using java. 

Edited by Jaii
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...