cerien Posted January 9, 2017 Share Posted January 9, 2017 HiI'm running Jaspersoft studio 6.3.1 on Linux Mint.I have a variable defined as :<variable name="solde" class="java.lang.String"> <variableExpression><![CDATA[$V{mntfac1}+$V{mntpay1}]]></variableExpression> </variable>and displayed as:<textField pattern="#,##0.00 €"> <reportElement x="333" y="24" width="100" height="14" uuid="5d1028f5-46e9-4367-aa9b-771adc12fdc5"/> <textElement textAlignment="Right"/> <textFieldExpression><![CDATA[$V{solde}]]></textFieldExpression></textField> And it displays as it had not format - solde is the addition of two other variables, it computes right, I can apply succesfully the pattern to the other variables, but the result (solde) wontAny ideas why ?TksJ<variable name="solde" class="java.lang.String"> <variableExpression><![CDATA[$V{mntfac1}+$V{mntpay1}]]></variableExpression> </variable> Link to comment Share on other sites More sharing options...
sanbez Posted January 10, 2017 Share Posted January 10, 2017 class="java.lang.String" ?Which result when it changed to java.lang.Double ? Link to comment Share on other sites More sharing options...
cerien Posted January 10, 2017 Author Share Posted January 10, 2017 thanks, it works indeed. What I fail to understand is that the variable was created as the sum of two doubles, and got a string type - and a correct result !J. Link to comment Share on other sites More sharing options...
sanbez Posted January 10, 2017 Share Posted January 10, 2017 It is a "feature" of Studio.Since one version (i don't remember which one) all fields (textfields?) created as String.Sometimes it work fine. Sometimes problems suddenly appear a problrms. Be careful. 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