geirsv Posted September 30, 2006 Share Posted September 30, 2006 Is there a way to set the height of each line in the detail band to be dynamic? By that I mean I want the height of each line to adjust according to the field that becomes the highest due to the width and amount of text. Thanks Link to comment Share on other sites More sharing options...
dheffelfinger Posted September 30, 2006 Share Posted September 30, 2006 Assuming you have dynamic text in text fields, you can set the isStretchWithOverflow attribute of the <textField> element to true. This will cause the text field to expand to accomodate the text. Make sure that any elements below the text field have a positionType of "Float", otherwise the text from the text field will be displayed "on top" of the other elements. For more information, check out my book, JasperReports For Java Developers. Available at Amazon or directly from the publisher. David Link to comment Share on other sites More sharing options...
geirsv Posted October 1, 2006 Author Share Posted October 1, 2006 Thanks, That did the trick. Link to comment Share on other sites More sharing options...
akgaddipati Posted June 12, 2007 Share Posted June 12, 2007 I had a similar problem and this trick worked. Thanks a Ton Link to comment Share on other sites More sharing options...
ardarico Posted September 5, 2007 Share Posted September 5, 2007 And what about images? In my detail section, I have either a textField or an image, and I would like to adapt the band height depending on the input (say, 15 if the input is text, 340 if it is an image). Thanks Link to comment Share on other sites More sharing options...
maduranga.pubudu577 Posted December 21, 2016 Share Posted December 21, 2016 ThanxIt also worked for me..<detail><band height="29" splitType="Stretch"><textField isStretchWithOverflow="true"> <reportElement x="0" y="3" width="72" height="20" uuid="61b00dae-e05c-4971-a754-f635a3043d57"/><textElement textAlignment="Center"><font fontName="Tahoma" size="10"/></textElement><textFieldExpression><![CDATA[$F{RefNo}]]></textFieldExpression> </textField></band></detail> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now