As the `return' is optional in the Groovy language would be convenient to add the ability to use blocks of code in the report expressions. I attached modified method
JRGroovyGenerator.generateMethod()
with this modification I can do something like:
</p><p> def row = (4 * $F{dep_rank} - 1) + $F{service_rn}</p><p> def qCol = (char)((((int)(char)'A') - 1) + 4)</p><p> def dCol = (char)((((int)(char)'A') - 1) + 5)</p><p> </p><p> "IF($dCol$row > 0, $qCol$row / $dCol$row, 0)"</p><p>
Attachments:
JRGroovyGenerator.generateMethod().zip
Recommended Comments
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