schmatte Posted March 24, 2010 Share Posted March 24, 2010 Hello,I've found a problem in JasperReports 3.7.1. I would like to subtract two date-fields with a formula in excel: <textField pattern="[h]:mm:ss"> <reportElement x="730" y="10" width="134" height="20"> <property name="net.sf.jasperreports.export.xls.formula" value="Q13-F13"/> </reportElement> <textElement/> <textFieldExpression class="java.util.Date"/> </textField> The contents of the cells are the following:Q13 24.03.2010 14:53:20F13 24.03.2010 14:52:40The shown result in Excel of the textField is: 0,000462963This value of the cell is as same as the expected value of 40 seconds, but the output-format of the cell is wrong. The expected format with the given pattern is 0:00:40. I can get this output-style only, if I change the format of the result-cell in Excel manually. I tried it with and without the class-information of the textFieldExpression, but the result was still the same. Does anybody know, why Excel/JasperReports doesn't evaluate the given pattern "[h]:mm:ss"?Thanks in advance.Regards. 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