While developing reports, its a common requirement to have the textbox height dynamic which should increase or decrease based on its content.
To achieve this in JasperReport is a bit tricky, because here we need to handle the textbox dynamic height along with all other objects position and height relative to the textbox in that specific band/section of the report.
So here are the steps to follow:
So here is the steps to follow:
1- Mark the textbox property Stretch With Overflow as checked(in Jaspersoft Studio)
2- Mark the Stretch Type attribute as Relative To Tallest Object for all elements in the same band/section which need to be stretched along with the textbox.
3- Mark the Position Type attribute as Float for all elements which are below the textbox in the same band/section of the report and needed to move down/up based on the height of the textbox.