Jump to content
  • Groovy, the possibility of using a block of code in the report expressions


    avdot
    Assigned User lucianc
    CategoryFeature request
    PriorityNormal
    ReproducibilityN/A
    ResolutionOpen
    SeverityTrivial
    StatusAcknowledged

    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>&nbsp;</p><p> "IF($dCol$row > 0, $qCol$row / $dCol$row, 0)"</p><p>



    User Feedback

    Recommended Comments

    Similarly, how will Java 7 closures be supported ad-hoc by JR, as the reference JDK is going to be released soon ?

     

    We can suppose that the binary format of .class files will change ?

    Link to comment
    Share on other sites



    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 account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...