inditrozen Posted January 27, 2008 Share Posted January 27, 2008 Hi All, I recently started developing the reports using Jasper and experiencing a problem while showing 0000 String in excel export. Requirement is some id should be shown in the report in four digits like 0000, 0001 and so on. I am passing this Field as a String in a map. It is printed correctly in pdf "0000" but same report in Excel shows it "0". Can somebody help Regards, Link to comment Share on other sites More sharing options...
lucianc Posted January 29, 2008 Share Posted January 29, 2008 This behaviour is caused by the IS_AUTO_DETECT_CELL_TYPE export flag, which used to be set to true by default for historical reasons. The use of this flag is now deprecated (IS_DETECT_CELL_TYPE can be used instead to achieve a reliable Excel cell type detection), and starting with JasperReports 2.0.3 IS_AUTO_DETECT_CELL_TYPE defaults to false. You'll have to explicitly set IS_AUTO_DETECT_CELL_TYPE to false (or upgrade to >= 2.0.3) to avoid having String text fields interpreted as numbers. HTH,Lucian Link to comment Share on other sites More sharing options...
inditrozen Posted January 29, 2008 Author Share Posted January 29, 2008 thx. 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