Using the Parameters Sheet

Use the Parameters sheet of the Report Properties dialog to set report parameters prior to previewing a report.

When printing or extracting data, the parameter value entry is automatically requested and uses the same format as that shown on the Parameters sheet of the Report Properties dialog.

Object parameters, which can be printed and used in scripts, are treated as String values and the return value from the Object class jadeReportWriterDisplay method for the object is used as the value.

Use the Parameters sheet to set your parameter values explicitly while testing your report. This means that you do not have to enter your parameters each time you test your report by performing a print preview.

For details about creating and using parameter fields, see "Using the Param Sheet" under "Using the Catalog of Available Fields Dialog", later in this chapter.

To set a report parameter prior to previewing

  1. Click the Parameters tab of the Report Properties dialog.

    The Parameters sheet, shown in the following image, is then displayed.

    Parameters that you have created previously are listed in the Parameter Name column.

  2. Click on the parameter whose value you want to change.

  3. In the Parameter Value column, enter or select a value for the appropriate parameter.

    You can place a parameter field directly into your report, but as you would typically use it to provide a variable to apply to a report field, you may not necessarily print the parameter itself. For example, you can apply an exchange rate to print a currency value in an alternative currency. For details about using a parameter and applying it through a script, see "Using the Param Sheet" and "Using the Script Sheet" under "Using the Catalog of Available Fields Dialog", later in this chapter.

  4. In the Ignore column, check the check box for the appropriate parameter to specify that the parameter is ignored in selection. This overrides the User value must be entered option on the Param sheet of the Catalog of Available fields dialog, and the "Parameter Value must be entered for <parameter name>" message box is not displayed when a parameter value is not entered.

    When this check box is checked in the JADE Report Writer Designer application, if the parameter selection item is self-contained, it is dropped from the selection. If it is in a selection block within brackets, it is replaced with true for an AND block and false for an OR block. This is done to make the code generation easier. The specified parameter is therefore treated as an all action when applied as a selection criterion (for example, when running a report for a specific department but all cost centers). Bracketing and negation are unchanged for the selection overall.

    If you use two or more parameters in a single selection (for example, is between or is one of), you must check the Ignore check box for each of the parameters for the all selection to take effect. If not, the values of these parameters are used.

    When reports are run from the user system, the JadeReportWriterReport class getExtraParameterDetails method can be called to return the value of the User value must be entered option for a specified parameter name. This can be used to enforce entry of a value for the parameter. For more details about the getExtraParameterDetails method, see Chapter 1 of the JADE Encyclopaedia of Classes, Volume 1.

    For details about using parameters as selection criteria, see "Using the Selection Criteria Sheet" under "Creating or Maintaining Profiles", later in this chapter.

    Both primitive and object parameters can optionally have a different value printed when the ignore flag is set for the parameter. To do this, re-implement the Application class jadeReportWriterParamLiteral method to return the required literal (for example, "<All>"). Parameters with their ignore flag set are reported as this value in the report body. If the method returns null (""), which is the default behavior, the parameter value is still reported. In either case, parameters used in scripts continue to use the parameter value rather than the method value.

  5. Click another tab if you want to make changes on other sheets of the Report Properties dialog.

  6. Click the Apply button to apply the changes you have made or click the Close button to close the Report Properties dialog.

    To save the recent changes when you close the dialog, you must click the Apply button immediately prior to closing the dialog. To abandon any changes that you have made but not yet applied, do not click the Apply button immediately prior to clicking the Close button.