Jump to content

No autoremove remaining text after space?


Recommended Posts

By: Tobias Karlsson - tullabeah

No autoremove remaining text after space?

2003-11-12 07:51

Hi!

 

I have a textfield with a fixed width.

If the text in that field is larger than the widht Jasper shows as much as can fit into this area, but if the String has a space character, jasper chops the text and presents only the text before this space.

 

What I need is for Jasper to print as much as possible of the text, regardless of spacecharacter in the String passed thru $F{}.

 

I can?t use StrechWithOwerFlow or redefine my width due to the specific and restricted design of my report.

 

 

Thanks!

 

 

 

 

By: Tobias Karlsson - tullabeah

RE: No autoremove remaining text after space?

2003-11-19 04:31

I?ve found a solution or workaround to this problem.

 

By determing how much space the text needs with a given font and fontsize I can use the subString method to chop the text into a correct size that will fit my field. This requires access to the values before they are passed into a DataSource.

 

But if someone has a better way to solve this, I?d be more than happy to listen.

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