Jump to content
We've recently updated our Privacy Statement, available here ×
  • Fixing issue with parameters default value expression not picked up during report execution


    prusyn
    • Features: Cache Version: v7.5 Product: JasperReports® Server

    Issue:

    [toc on_off::hide=1]

     

    User has created a report with an Input control of type Collection (Multiselect) from jasper studio. Input control loads data from the Query. In Jasper server, he needs a default value to be set for the filter. He tried to keep below expression in "Default Value Expression" secton of the Parameter properties:

    1. (java.util.Collection)(Arrays.asList("NO")) ("NO" is the one the result set)
    2. new ArrayList(Arrays.asList(new String[] {"NO"}))

    None of them are working. Why?


    Resolution:

    It turns out the export zip of the reports customer sent contained a data snapshot for the report. So, we made a conclusion that customer has enabled data snapshot persistence in the instance.

    So, what happens is - when a report has a saved data snapshot, the parameter values that correspond to the data snapshot are used as defaults in favor of parameter default value expressions. Therefore it could be that the report data snapshot contains parameter values that are different from the default values.

    To resolve this you have to open the report, change the parameter values to the desired defaults, run the report and then save it (from the report viewer). That would overwrite the existing data snapshot with a new one with different parameter values.


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