rkuznetsov Posted May 24, 2020 Share Posted May 24, 2020 Here's the simple code in XML view of print form:<variable name="TITLE" class="java.lang.String"> <variableExpression><![CDATA[$F{APP_NUMBER}.replaceAll( "app_", "" )]]></variableExpression></variable>[/code]If I use this variable in form, it returns null (while using "$V{TITLE}"). But if I remove replaceAll method, it works and returns correct value. What is wrong with expression? Should I use something instead of "<variableExpression>"? Link to comment Share on other sites More sharing options...
Solution ruthran Posted May 26, 2020 Solution Share Posted May 26, 2020 Variable execution depends on which band there were actually placed. Can you let me know where you are placing it. Variable usually return NULL if they were not rendered at proper time. To manipulate this, we also have another called "Evaluation time" on the text box. You can try changing the default value "Now" to some other value and see whether it is working. 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