BackPrevious Page Next PageNext

Specifying Parameter Values for a Dashboard

Specifying parameter values to a dashboard

Specifying multiple values for a parameter

Saving default parameter values

Saving parameter values for reuse

Specifying parameter values to a library component

Sharing parameters between library components

Specifying parameter values to a dashboard

When you run a dashboard that contains parameters, the default values of the parameters are applied automatically to the dashboard by default, which can be the default values specified in the parameters' definition or the default values you save for the dashboard when Use User Defined Default Parameter Values in the JDashboard profile is selected.

If you want to change the parameter values, after the dashboard is opened in JDashboard:

  1. Click Enter Parameter Values button on the toolbar to display the Enter Parameter Values dialog.

    Enter Parameter Values dialog

  2. Edit the parameter values according to your requirement.

    The way to specify a parameter value varies according to the type and properties of the parameter. Here are several ways you can use to specify parameter values:

  3. If you want to save the specified values as the default values for the parameters, select Save as default.
  4. To reset the parameter values, make use of the Reset button.
  5. Click Submit to apply the specified parameter values.

Note: You are recommended not to use blank as the thousands separator in Number-typed parameter values under French locale, otherwise your input will not be correctly recognized because of a JVM bug. For details, see http://bugs.sun.com/view_bug.do;jsessionid=c8cdaf911b20fffffffffd9fc6340b30d670?bug_id=4510618.

Tip: If you want to make the Enter Parameter Values dialog display before running dashboards that contain parameters, you can check the JDashboard profile option Show Enter Parameter Values Dialog.

Specifying multiple values for a parameter

For a parameter that allows for multiple values (the parameter's Allow Multiple Values property is true), you can specify one or more values to it.

  1. Click Enter Values in the value text box of the parameter. The Enter Values dialog appears.

    Enter Values dialog

  2. If the parameter's Enable the "All" Option property is true, the All checkbox is available and by default it is selected. It means to apply the "All" value to the parameter. When the parameter is inserted as a field into a report and All is selected as the value, the field will show the string "All". If you do not want to apply the "All" value to the parameter, deselect the All checkbox, then check the Custom option and specify the desired values as shown in the following steps.
  3. Select the required values in the Available Values box and click Add Values to add them to the Selected Values box; to add all the available values, click Add All Values. You can make use of the Search button Search button to search for the required values among the available values: click the Search button button to display the search text box, type in the keyword and the available values that contain the keyword will be listed with the keyword highlighted in the values.

    If some added values are not wanted, select them in the Selected Values box and click Remove Values to remove them; to remove all added values, click Remove All Values.

  4. When the parameter's Allow Type-in of Value property is true, you can add values for the parameter manually: click the button Add button, type in a value in the displayed text box, then press Enter to add it to the Selected Values box. When the parameter is bound with a column, but the display column is different from the bound column, make sure the value you enter is that of the bound column. After finishing adding the values manually, click Delete button in the text box to close it. If the parameter is of the Date, Time or DateTime type, you can also click the calendar button Calendar button to specify a date and time value.
  5. Click OK to select the specified values for the parameter.

Saving default parameter values

By default, when any user runs a dashboard with parameters, the parameter values saved with the dashboard are applied, which means that all users see the same parameter result. However you can customize the default parameter values of a dashboard for your own. To do this, in the Enter Parameter Values dialog specify the parameter values you want as the default values, select the Save as default option, and then click Submit.

However when using the Save Default Parameter Values feature, you need to be aware of the following:

Saving parameter values for reuse

When specifying parameter values for dashboards, you may want to save the specified parameter values for reuse next time. JReport provides two ways of saving. One is users decide when and which parameter values to save, the other is JReport saves each applied or submitted parameter value automatically. When the saved number in either way reaches the maximum, the oldest record will be removed. The number is calculated on a user-dashboard basis. Take a dashboard with two parameters for an example, supposing the maximum number is set to 3. Each user can save at most three groups of parameter values for the dashboard, with each group containing the values of the two parameters.

To switch on the function of saving parameter values, you need to configure the server profile: select Yes to the option Enable Saving Parameter Values, then select in which way to save the values: Manually or Automatically, and specify a maximum number to limit the saved value groups via the Maximum Number of Auto Complete Parameters List option for each user-dashboard pair.

Manually saving parameter values

When you have chosen to manually save parameter values, the Use Saved Values button Use Saved Values button will be available in the Enter Parameter Values dialog. By clicking this button, you will get the following:

Using automatically saved parameter values

When you have chosen to automatically save parameter values, each time a user submits a group of parameter values to a dashboard, the group is saved by JReport automatically. The next time the same user runs the dashboard, the auto saved parameter values will be available in the parameters' value lists for selection in the Enter Parameter Values dialog.

Specifying parameter values to a library component

You can access the configuration panel of a library component to specify its parameter values. To do this, click Options icon on the component title bar and select Edit Setting from the drop-down menu to display the configuration panel. Specify the values in the panel and click OK to apply them to the library component. The Cancel button is used to close the configuration panel.

The "Show the panel by default" option in the panel is used to control whether to show the configuration panel before rendering the library component each time the dashboard runs or is refreshed. For example, if a library component uses parameters, and you would like to specify parameter values before loading the component rather than first loading the component and then changing the parameter values so as to run the component the second time to get the desired result, you can check this option to have the panel displayed before rendering by default.

Sharing parameters between library components

A dashboard can have multiple library components and all these components are independent from each other. When several components contain parameters which have the values and come from the same catalog, by default these parameters are regarded as separate parameters each connected to its own component. To submit a value to all these components, you need to submit the value for each of the parameters. However by sharing the parameters, you only need to provide a value for one of them as a representative of all the parameters. The parameters do not need to have the same name but do need to share the same values. You only need to submit values to this parameter once and all the components will use the specified values. By sharing parameters, the same parameters will only send the query once to the database, thus the dashboard performance can be improved.

What parameters can be shared

JDashboard supports sharing two types of parameters coming from different library components in the same dashboard:

The rule for merging the values of the shared parameters

Within a sharing group, if all the shared parameters allow for type-in values, the merged value result is the union of the values of all the parameters. The merged value names are distinct. However if any of the shared parameters does not allow type-in values, the merged value result is the intersection of all the values.

Unexpected results after sharing parameters

Sometimes there may be unexpected parameter sharing that does no harm to the report system and report data, but the dashboard result may be unexpected.

After sharing parameters, their values will be merged. The merged values result may be bigger or smaller than the value lists of some of the shared parameters, which might lead to some values cannot be supported by some components or some values can never be available to some components.

For example in the case of @Province and @State, if the parameters are shared then the list of values will be all states and provinces. However, one library component may use a query that limits the data to US only, thus if the user selects a Canadian province from the list the component will have no data.

How to share parameters

  1. Click the Options button Options button on the toolbar and then select Share Parameter from the option list. The Share Parameters Setting dialog appears.

    Share Parameters Setting dialog

  2. Select the parameters you would like to share by holding the Ctrl key. If the selected parameters support being shared, the Share button will be enabled. Click the button. The parameters will be added into one sharing group.

    To add another parameter into a sharing group, select any parameter in the group while holding Ctrl and then select the parameter, then click Share.

    To remove parameters from a sharing group, select the parameters and then click Cancel Share which appears in the place of the Share button.

  3. Click OK to finish.

BackPrevious Page Next PageNext