vftake5 Posted January 10, 2014 Share Posted January 10, 2014 Hi,I have to use specific date formatting in my report. No problem, created a new variable, what contains a SimpleadteFormatter, and the format comes from resource file. At firs time I did it the on subriport and it works correctly. Ok, I did same variable in my main report and it gives back 'null' as result.The definition: <variable name="sdf" class="java.text.SimpleDateFormat"> <variableExpression><![CDATA[new SimpleDateFormat($R{date.format})]]></variableExpression> </variable>[/code]And the usage:<textFieldExpression><![CDATA[$V{sdf}.format($P{actDate})]]></textFieldExpression>[/code]After it I changed the definition, and I wrote direcly the format string. Then it was working correctly. Then I took the value of affected resource into a textfield, and I saw the value is correct. And then I have no idea. It looks like, the variable evaluation hapens earlier as the resource fill. Do you have any idea, how can solve this problem?Thank you!Feri Link to comment Share on other sites More sharing options...
vftake5 Posted January 10, 2014 Author Share Posted January 10, 2014 - 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