Jump to content
Changes to the Jaspersoft community edition download ×

Stretch fields in Excel export


mrpresto

Recommended Posts

This report is an Excel export data dump, 70+ fields including a text blob notes field at the end of the row. Several fields deep in the report are truncating the data when the report is run; in essence, the field is too short for the data. After researching the problem on this site, I have set the Stretch Type to RelativeToBandHeight, set the Position type to Float, turned on Print when detail overflows, etc. as indicated in other postings. I can't seem to find the combination of switches that will let the text fields take all the data the query is sending in a field regardless of the design width of the text field.

 

Since this report is specifically designed to export to Excel, the detail band has to be set to the same height as the fields or we get extra blank rows between the data rows, which is not desirable. Also, since it is going directly to Excel, the ultimate width of the datafield is irrelevant as the user can shrink or expand Excel cells to fit the data as they see fit.

 

With all the fields in this report - the current width of the report is over 64 inches - having to move and resize and tweak all the controls to fit the data could prove to be a huge job. Is there a simple way to expand the capabilities of a text field without having to physically resize the element?

 

TIA, Mike

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

Is this problem only related to the Excel export?

I mean, does you data get truncated also in PDF? or rather in the JasperViewer?

 

If it is only about Excel format, than note that the cell size problems might actually come from font size problem. You just don't see the whole text in the cell and have to resize it manually just because the fonts in excel are slightly bigger than in AWT or because in Excel format we cannot control line spacing and this line spacing is causing the text to occupy more space than it was calculated for it a report rendering time using AWT metrics.

 

I hope this helps.

Teodor

Link to comment
Share on other sites

  • 8 months later...

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