Chandu
Chandu

Reputation: 871

How to increase Detail band height dynamically

My requirement is to increase the Detail band height dynamically when the text field has more data. Are there any settings to increase to it?
I am using one textField in the Detail band when it has more information (words), it is displaying only some information.

i.e the words are being cut off. Depending on the detail band height the words are displaying. I would like to increase the band height dynamically when the text field has more data.

Upvotes: 27

Views: 43930

Answers (4)

Fahmida
Fahmida

Reputation: 1210

@Ehtisham's answer is right. But in newer version of Jaspersoft Studio there is no Stretch with overflow property. You have to select the overflow textfield and in the Properties, in Text Adjust select StretchHeight

  1. Position type: float
  2. Stretch type: relative to tallest object
  3. Select Text Field and then in Text Adjust select StretchHeight

In the source it will look like this

<textField textAdjust="StretchHeight">
                    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="29" y="0" width="501" height="50" uuid="220d14f8-7cee-4315-9cf7-647b7c480735"/>
                    <textFieldExpression><![CDATA[$F{NAME}]]></textFieldExpression>
</textField>

Upvotes: 0

Arun
Arun

Reputation: 11

Go to Report level properties. Advanced - Set the Column count and then Print order as Horizontal

Upvotes: 1

Ehtisham
Ehtisham

Reputation: 339

First select your field and set following properties (third one is most important):

  1. Position type: float
  2. Stretch type: relative to tallest object
  3. Stretch with overflow: true (checked)

Upvotes: 33

Gordon
Gordon

Reputation: 4843

Try setting the text field and surround object to Position Type Float in the object's properties.

This should let the report expand as the text field grows.

Upvotes: 1

Related Questions