Jump to content
We've recently updated our Privacy Statement, available here ×

jasper XLS: string type field (leading apostrophe)


cris_rufino

Recommended Posts

Peaple,

I was using jasper 1.3.0 to generate a XLS report using JRXlsExporter routine. The report contains string type fields with numeric value. Here, the excell and broffice calc show the cell correctly (31, for exemple).

When I migrate to jasper 3.0.0, the cell is showed with leading ' character ('31, for exemple). The IS_DETECT_CELL_TYPE property did not solve my problem. My client need the cell without the ' character to export the XLS data to your internal system, i.e., my new jasper version (3.0.0) did cause an incompatibility to my client export routine.

Thanks for any help response.

[ ] ' s

Cris.



Post Edited by cris_rufino at 01/08/2010 16:40
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Solved problem ;-)

Setting IS_AUTO_DETECT_CELL_TYPE=true and IS_DETECT_CELL_TYPE=false make jasper 3.0.0 behavior equal jasper before 2.0.3, when the default value of IS_AUTO_DETECT_CELL_TYPE have changed, acording to chagelog file:

JasperReports 2.0.3 (2007-12-12)

- the default value of the deprecated JRXlsExporterParameter.IS_AUTO_DETECT_CELL_TYPE exporter parameter is now "false"; the newer IS_DETECT_CELL_TYPE exporter parameter should be used to control the cell types in the generated XLS documents.

[ ]'s

Cris

Link to comment
Share on other sites

  • 10 years later...

Leading apostrophe might be caused by having a formatting expression in the text field.

In our case we had a date field wrapped with DATETIME formatter. This would appear fine on PDF's, but the dates would be generated with a leading apostrophe like '21/12/2020

We removed the DATETIME and used Jasper Report's own formatter (Text Field > Pattern > dd/MM/yyyy).

or

<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">

Regards,

Can

 

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