Jump to content
Changes to the Jaspersoft community edition download ×

Excel: long text in cell, but don't want to truncate OR wrap


cara

Recommended Posts

My first post on these forums, and Internet Explorer wiped the whole thing out.  I'm going to be less verbose, this time but, hopefully, still explain my problem:

I'm an iReport and Java noob, forced into using iReport by way of being responsible for creating custom reports for a "student information" system that requires iReport -- and requires version 2.0.4, for some reason.

I have a beautiful report designed to go to Excel, and it works great except for one thing:  (excuse this ->) Crystal Reports can export a long text string put into a narrow field and, when it gets to Excel, it KEEPS but does not display the long text - in other words, it doesn't automatically widen the column, but it doesn't truncate the text, either.

I can't duplicate that, in iReport.  I've read lots of posts and have tried lots of combinations of "stretch with overflow" and various export properties

net.sf.jasperreports.export.xls.white.page.background false

net.sf.jasperreports.export.xls.ignore.cell.background true

net.sf.jasperreports.export.xls.remove.empty.space.between.rows true

net.sf.jasperreports.print.keep.full.text true

net.sf.jasperreports.export.xls.collapse.row.span true

net.sf.jasperreports.text.truncate.at.char false

But I always end up with truncated text OR a cell that wraps onto multiple rows, causing a blank row between records (not acceptable, in Excel).

I *could* make this column wider, in iReport -- but I don't really know how wide it might go, and I have LOTS of columns like that, in my report.

Any tips?

Thanks

 

Link to comment
Share on other sites

  • 2 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Did you ever get an answer or find a way to implement this? We're having the same problem. 

In theory, the following parameters are supposed to handle this, but they don't seem to work (at least I've never been able to get it to work):

"net.sf.jasperreports.print.keep.full.text", "true"
"net.sf.jasperreports.export.xls.wrap.text", "false"
 
Our solution was to just make the columns as wide as the largest data elements (a guess of course, but it handles 99% of the cases).
Link to comment
Share on other sites

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