## Creating a parameter

To create a parameter in a catalog, follow the steps below:

1. In JReport Designer, open the catalog file in which you want to create the parameter.
2. In the Data tab of the Catalog Browser, expand the data source that will include the parameter, right-click the Parameters node and select Add Parameter from the shortcut menu. The Create Parameter dialog appears. See the dialog.

3. In the Name field, input a name for the parameter.
4. Select a parameter type from the Value Setting drop-down list. For parameters in XML connection, it can only be Type-in Parameter.
5. In the values section, specify the parameter values as required. The section varies with the type you select from the Value Setting drop-down list.
   - For Type-in Parameter:
     1. Specify the data type of the parameter value from the Value Type drop-down list.
     2. Click to add a value line, double-click in it and then type in a value of the specified data type.

        If the parameter is of Date, DateTime, or Time type, you can also click the calendar button to set a date and time value using either calendar or built-in formula functions.

     3. Repeat the second step to add more values.

        To adjust the order of the values, click or ; to remove any unwanted value, select it in the list and then click .

     4. Specify the value which will be set as the default selected value in the Enter Parameter Value dialog by selecting it from the list.
   - For Bind with Single Column:
     1. From the Source drop-down list, select the required data source type: Tables and Views (including synonyms), Stored Procedures, Imported SQLs, or User Defined (if the specified catalog data source to which the parameter is added contains only a MongoDB connection, only Tables and User Defined are available in the drop-down list). Then, all fields in the specified catalog data source of this type will be available for value selection.
     2. Select a field from the Bind Column drop-down list. This field is used to filter the query when running a report with the parameter.
     3. If you want the values of another field to be displayed in the Enter Parameter Values dialog, which makes more sense to report end users than the values of the Bind Column field, select that field from the Display Column drop-down list.
   - For Bind with Cascading Columns:
     1. From the Data Source drop-down list, select the required data source from which to get the columns. You can get data from a table, view, synonym, stored procedure, imported SQL, or user defined data source. However, if the specified catalog data source to which the parameter is added contains only a MongoDB connection, only tables and user defined data sources are available.
     2. Click to add a parameter row.
     3. Click in the Bind Column cell and select a field from the drop-down list.
     4. If you want the values of another field to be displayed in the Enter Parameter Values dialog, which makes more sense to report end users than the values of the Bind Column field, click in the Display Column cell and then select that field from the drop-down list.
     5. Click in the Parameter cell to create the parameter. A name for the parameter will then be automatically added by JReport.
     6. Repeat steps b to e to create more parameters. Make sure that the selected Bind Column fields are of cascading relationship one level by one level down. In this way, a group of cascading parameters are created.

        To adjust the order of the parameters, click or ; to remove any unwanted parameter from the cascading group, select it and then click .

6. In the Options box, set options for the parameter according to your requirements.
7. When done, click OK to create the parameter.