XML Divide by 1000



I'm having trouble when I try to divide a text field by 1000. Currently it's set to Millimetres but I need it to be set to metres. I thought by dividing the text field by 1000 it would do this but it throws the following error.



There was an exception while running the report


An exception occurred while creating a report. root-cause=class groovy.lang.MissingMethodException/No signature of method: java.lang.String.div() is applicable for argument types: (java.lang.Integer) values: [1000]"


The code for XML is as following:



</textElement>
<textFieldExpression><![CDATA[$F{EquipmentLengthMm} /1000
]]></textFieldExpression>
</textField>
<textField pattern="###0.00" isBlankWhenNull="true">
<reportElement x="399" y="0" width="32" height="20"/>
<textElement>
<font size="12"/>


I think I may require a variable expression to complete this?


Thanks in advance


No comments:

Post a Comment