BackPrevious Page Next PageNext

Using Web Controls

Using parameter control to specify a parameter to a report

Using parameter form control to run reports

Using filter control to filter report data

Using navigation control to undo/redo value selection in filter controls

Web controls are report components designed to be similar to the kinds of controls found on web pages. In Web Report Studio, these four types of web controls can be applied: parameter control, parameter form control, filter control, and navigation control.

This section describes each of the web controls and how to use them.

Using parameter control to specify a parameter to a report

A parameter control is a web control that is bound with a parameter used by the current report. By specifying values to the parameter in a parameter control, you can pass the parameter values to JReport and run the report with the specified values.

Cascading parameters cannot be used in parameter controls. If you want to do this, use parameter form controls instead.

To insert a parameter control and use it to specify a parameter to a report:

  1. Drag Parameter Control from the Components panel to the destination in the report. The Insert Parameter Control dialog appears.

    Insert Parameter Control dialog

  2. Select the parameter you would like to add to the parameter control, then click OK.
  3. A parameter control will be added into the report.

    You can then switch Web Report Studio to View Mode to specify the value for the parameter. You may specify the value in one of these ways. Once the value in the parameter control changes, the report will re-run with the new parameter value.

Note: If the specified parameter is no longer used in the report, the parameter control will become invalid.

Using parameter form control to run reports

A parameter form control is a web control that is bound with the parameters used by the current report or other reports. By specifying values to the parameters in a parameter form control, you can make the reports run with the specified parameter values.

To insert a parameter form control and use it to run reports:

  1. Drag Parameter Form Control from the Components panel to the destination in the report. The Insert Parameter Form Control dialog appears.

    Insert Parameter Form Control dialog

  2. Specify the target reports to run using the parameter form control.
  3. Specify whether to include the Submit button in the parameter form control. If Submit is included, it is used to submit the parameter values you specified in the parameter form control. If Submit is not included, once you change the values of a parameter in the parameter form control, the new values will be applied automatically.
  4. Click OK in the dialog to save the changes. The parameter form control is now inserted in the report, listing the selected parameters for the current report or all parameters used by the specified reports.

    You can then switch Web Report Studio to View Mode to specify values of the listed parameters in the parameter form control. You may specify the values in these ways. Click the Submit button to run the current report or the specified reports if the button is available. If there is no Submit button, the change of values in the parameter form control will trigger report re-running.

Note: If you save or publish a report containing a parameter form control to another directory, the reports that you bind the parameter form control with will not be saved or published along with the report.

Using filter control to filter report data

A filter control is used to filter one or more data components in a report, which refer to tables, charts, and crosstabs. For how a filter control works, see Filtering scenarios.

The filters created via filter controls are referred to as on-screen filters, the values of which can be saved as the default ones.

To insert a filter control and use it to filter report data:

  1. Drag Filter Control from the Components panel to the destination in the report. The Insert Filter Control dialog appears.

    Insert Filter Control dialog

  2. The Select Fields drop-down list lists all the group and detail objects in the business views used by the current report. Select the objects of the same data type based on which to create the filter control, and then click outside of the drop-down list to close it. The name of the first selected object will be displayed as the name of the filter control.

    Select Fields

  3. All values of the selected objects are used in the filter control by default. If you want to customize the value list, check Customize Initial Values and then click Fetch Data to select the desired values in the Fetch Data dialog. You can also type in the values manually in the text box below.

    To enter a value, input it in one row, and then press the Enter key to start a new row. General text editing operations including copy, paste, cut, backspace, delete and so on are supported. You need to make sure of the accuracy of the formats and values.

    Customize Initial Values

  4. By default, all filter controls that are applied to the same data components are linked. Selecting a value in one filter control, for example, USA, will result in that all the other linked filter controls respond to gray the values that do not belong to USA or that do not contain USA or that are not related to USA like London. If you do not want the filter control to be affected by other on-screen filters, unselect Link to Other Filters.
  5. From the Apply To drop-down list, specify which data components in the report the filter will be applied to.

    By default, JReport applies the filter to all the data components created using the business views in which the selected objects are obtained. If you uncheck the data components which are based on the same business view as any selected objects, these objects will not be used in the filter and thus their values will not be listed in the filter control.

  6. Click OK. The filter control is then inserted in the report, listing values of the selected objects which are applicable to the specified data components. If the selected objects have values in common, the common values are distinctive in the filter control.
  7. You can then switch Web Report Studio to View Mode to select the values with which you want to filter the report data. A filter condition based on the selected values is then applied to the specified data components in the report.

    You can make use of the Ctrl or Shift key to select multiple values. If the values themselves have inter-relationship, after you make the selection, JReport will deal with the rest values to put the related ones on the top and gray the ones that have no relationship with the selected values. The grayed values are still selectable.

After inserting filter controls in the report, you can also insert a navigation control for undoing/redoing the value selection in the filter controls. For details about the usage of navigation control, see Using navigation control to undo/redo value selection in filter controls.

Managing a filter control

When right-clicking on a filter control, these options are available for managing the filter control.

Filter Control options

Notes:

Using navigation control to undo/redo value selection in filter controls

A navigation control can be considered as an accessorial control for filter controls and used to deal with the value selection operations in all the filter controls in the same report.

To insert a navigation control into a report, drag Navigation Control from the Components panel to the destination in the report.

A navigation control is a combination of three buttons:

BackPrevious Page Next PageNext