Jump to content
We've recently updated our Privacy Statement, available here ×
  • Equality comparison for null fails in input control, 4.7


    gregd
    • Features: Input Controls, Parameters Version: v4.7 Product: JasperReports® Server

    Issue:

    In 4.7 the following query for a query-based input control will fail when the value of parameter is null:

    select * from foo where column = $P{parameter}


    Resolution:

    Query-based input controls now support the $X{} syntax to handle equality comparisons with null values as input. The following query will fail when the value of parameter is null:

    select * from foo where column = $P{parameter}

    Instead, use the following syntax:

    select * from foo where $X{EQUAL, column, parameter}

    The $X{EQUAL...} syntax will generate the correct SQL to compare the value of the parameter when it is null. For any other types of comparison, such as greater than, use the $P{} syntax.


    References:

    4.7 Release Notes - Upgrading Input Controls to 4.7 http://support.jaspersoft.com/download_preview.php?pl=1#ReleaseNotes

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    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...