Jump to content
JasperReports Library 7.0 is now available ×

stretch does not work for JRDesignStaticText


Recommended Posts

By: BGD - bgd81

stretch does not work for JRDesignStaticText

2006-04-19 02:16

I programmatically create a report and i can't know the length of the data that will be displayed. For the report data, i use JRDesignTextField; after i call textField.setStretchWithOverflow(true); and textField.setStretchType(JRDesignTextField.STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT); the cells are stretched vertically which is fine. If i don't call this methods the data is truncated to the cell size.

 

I also need this behavior for the header columns which i create using JRDesignStaticText. Although i can call the method colName.setStretchType(JRDesignStaticText.STRETCH_TYPE_RELATIVE_TO_BAND_HEIGHT); it doesn't have any effect. Probably because there is no equivalent method for setStretchWithOverflow(true)...

 

Is there any way to configure the report design or the exporter so the column header names will not be truncated ?

 

 

 

 

By: Nacor - nacor

RE: stretch does not work for JRDesignStaticText

2006-04-20 00:31

Why dont you use JRDesignTextField for your column headers ? JRDesignStaticText does not have a method setStretchWithOverflow.

 

 

 

 

By: BGD - bgd81

RE: stretch does not work for JRDesignStaticT

2006-04-20 05:09

I didn't know that JRDesignTextField can contain just some plain text. This solution works.

 

Thanks for the suggestion !

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