Jump to content

Split text field dynamically into two columns


haupjo

Recommended Posts

Hi All,

 

I wanna create a report with two columns (Columns = 2) which just contains one text field. As the content of this text field is of variable length, the text should dynamically be allocated to the two columns, dependent on the size of the content. Using iReport Designer 4.7.1.

 

Eg.: text field content: "I'm new in this community and looking forward for answers solving my little problem. I'm very thankfull for all helpfull replies!"

 

This should in the end look like this:

I'm new in this community and looking   little problem. I'm very thankfull for all 
forward for answers solving my   helpfull replies! 

 

I already tried combinations of Print order "Vertical/Horizontal" (Report properties),  Position Type, Stretch Type, Stretch with Overflow (Text Field properties), however all I can get is just the text field being displayed in the first column only (truncated when stretching is not specified or print order is horizontal and the hight of the detail band is not big enough) like this:

I'm new in this community and looking
forward for answers solving my
little problem. I'm very thankfull for all
helpfull replies!

 

XML Code (without start tag):

 

detail>
band height="55" splitType="Stretch">
textField isStretchWithOverflow="true">
reportElement uuid="bbcadfb5-656e-4d24-a0a7" positionType="Float" x="0" y="0" width="273" height="20" isPrintWhenDetailOverflows="true"/>
textElement/>
textFieldExpression> ![CDATA[$F{field}]]> /textFieldExpression>
/textField>
/band>
/detail>
 
 
Thanks for your help! If you need more information from my side, please let me know.
Jo
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...