Jasper Ideas

Creating a function that is used as a parameter

Would it be possible to create a function that is used as a parameter. Then the results of the parameter entered could be used in a calculation (this is a common requirement).

For example:

- Function that asks for “Top X” suppliers

- This function is used in a Parameter presented to users, they type in 10

- The Report has a calculation which makes use of the input value (eg IF(“Top X” > 10, ‘High’,’Low’))

  • Guest
  • Nov 15 2021
  • To be Reviewed
Components JasperReports Server
  • Attach files
  • Johannes Held commented
    21 Feb 11:54am

    You can use the Parameter values with $P{PARAM_NAME} in any expressions.
    E.g. IF($F{TOP_X} > $P{TOP_X}, 'High','Low')

  • Guest commented
    15 Nov, 2021 03:47pm

    See Tibco 02037792