tsukebumi Posted July 31, 2015 Share Posted July 31, 2015 I have a report with a field filled with a java.lang.String value. This report generates an excel file and I need to format it as text.Currently using iReport 3.7.6 to generate de jrxml and jasper files and jasper 4.6.0 with a web application. I tried setting pattern format for rhe cell in the jasper report to @, but I guess it is not valid.On other 'numeric' fields with a given pattern I was able to use JRXlsAbstractExporterParameter.FORMAT_PATTERNS_MAP to give it a text format in excel with a map mapping the format '#,##0' to '@', but I have not been able to apply this way with the String fieldHow can I do it?Could I do it with a newer jasper version ? Link to comment Share on other sites More sharing options...
hozawa Posted August 2, 2015 Share Posted August 2, 2015 You can't format text string with a "pattern". If the text field contains numeric, date, or currency, convert it to their respective data type and then do a format. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now