Creating a Parameter
To create a parameter in a catalog, follow the steps below:
- Open the required catalog.
- In the Catalog Manager, expand the data source in which to create the parameter, then:
- Select the Parameters node or any existing parameter in the data source and select New Parameter on the Catalog Manager toolbar.
- Right-click the Parameters node in the data source and select New Parameter on the shortcut menu.
he New Parameter dialog appears.
- In the Name field, input a name for the parameter. Since parameters and DBFields share the same name space, you might want to preface parameters with a small "p" such as pStartDate.
- Select a parameter type from the Value Setting drop-down list: Type-in Parameter, Bind with Single Column or Bind with Cascading Columns.
- 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:
- Specify the data type of the parameter value from the Value Type drop-down list.
- If you want to provide the user with a default value, select to add a value line, select on the new line and then type in a value of the specified data type.
If the parameter is of Date, DateTime, or Time type, you can also select the calendar button to set a date and time value using either calendar or built-in formula functions.
- Repeat the second step to add more values.
To adjust the order of the values, select or ; to remove any unwanted value, select it in the list and then select .
- To make a value the default selected value in the Enter Parameter Value dialog, select it from the list.
- For Bind with Single Column:
- From the Source drop-down list, select the required data source type: Tables and Views (including synonyms), Stored Procedures, Imported SQLs, or User Defined then all fields in the specified catalog data source of this type will be available for value selection.
- Select a field from the Bind Column drop-down list. At runtime, end users will see a list containing all the distinct values in this field. For example State would show a list of states the users can choose from.
- If you want the values of another field to be displayed in the Enter Parameter Values dialog, which has more meaning to the end users than the values of the Bind Column field, select that field from the Display Column drop-down list. For example you may bind the Customer ID column but want to display the full customer names for end users to choose from. Select here for an example.
- For Bind with Cascading Columns:
- 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.
- Select to add a parameter row.
- Select in the Bind Column cell and select a field from the drop-down list.
- If you want the values of another field to be displayed in the Enter Parameter Values dialog, which has more meaning to the end users than the values of the Bind Column field, select in the Display Column cell and then select that field from the drop-down list.
- Select in the Parameter cell to create the parameter. A name for the parameter will then be automatically added by Logi JReport.
- Repeat steps b to e to create more parameters. Make sure that the selected Bind Column fields are of a cascading hierarchy. In this way, a group of cascading parameters are created. For example, the parameter group could first be by State followed by County and then by City. Select here for an example.
To adjust the order of the parameters, select or ; to remove any unwanted parameter from the cascading group, select it and then select .
- For Type-in Parameter:
- In the Options box, set options for the parameter according to your requirements.
- When done, select OK to create the parameter.
Notes:
- When you create a parameter in a catalog data source that contains only XML connections, the parameter type Bind with Cascading Columns is not supported.
- If a parameter is added in a catalog data source that contains only MongoDB connections, only tables and user defined data sources can be used to bind with the parameter.