pt_1 Posted June 23, 2016 Share Posted June 23, 2016 Hi everyone,I'd like to limit the width of a textfield but not the height.So i did some changes in the properties of the textfield. Position Type: FloatStrech Type: Relative To Tallest ObjectStrech With Overflow: true But this is to strech the textfield horizontal and vertical.Thanks!---------------------------------------------------------------------------------------------------------------------------------------My Code: <detail> <band height="53" splitType="Stretch"> <elementGroup> <textField isStretchWithOverflow="true"> <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="150" y="0" width="390" height="14" uuid="3511c796-9b6c-46e3-a85e-a0a496dd9276"/> <box> <topPen lineWidth="1.0"/> <leftPen lineWidth="1.0"/> <bottomPen lineWidth="1.0"/> <rightPen lineWidth="1.0"/> </box> <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression> </textField> </elementGroup> </band> </detail> Link to comment Share on other sites More sharing options...
lucianc Posted June 23, 2016 Share Posted June 23, 2016 The text field is limited by its element width. Does the text stretch horizontally beyond 390 pixels?Regards,Lucian Link to comment Share on other sites More sharing options...
pt_1 Posted June 24, 2016 Author Share Posted June 24, 2016 In a pdf-file the limits work correctly, but in a HTML-file they failed.For examplePDFHTML Link to comment Share on other sites More sharing options...
Solution lucianc Posted June 24, 2016 Solution Share Posted June 24, 2016 Try setting the net.sf.jasperreports.export.html.wrap.break.word property to true.An alternative solution is to set the net.sf.jasperreports.text.save.line.breaks property instead. 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