Using built-in functions to set date and time parameter values

For a parameter of the Date, DateTime, or Time type, you can customize a dynamic date and time value by creating an expression using built-in formula functions.

To do this:

  1. In the places where you are able to specify a value for the parameter, you may see the calendar button . Click this button and the Calendar dialog is displayed. See the dialog.
  2. The Template drop-down list on the right provides some predefined expressions for you to use. You can customize your own expression either based on an existing template or by directly editing the contents in the Expression text box.

    If you cannot see the Template label on the right, click >> on the bottom left corner.

  3. JReport's built-in Date/Time formula functions are available for inserting into your expression. To make use of them, click to display the Expression dialog. See the dialog.
  4. The top text box shows the current expression statement. Expand the Date/Time node below, double-click the required function to insert it where the cursor is located in the expression. Upon finishing, click OK to return to the Calendar dialog.
  5. The Preview box calculates the result of the current expression. If the expression is not correct, an error message will be shown in the Preview box. Each time you modify the expression, you can click in the Preview box to refresh the result.
  6. When done, click OK to add the value.

See also Calendar dialog and Expression dialog for additional help about options in the dialogs.