BackPrevious Page Next PageNext

Applying Filters

Applying filters to business views

Filtering the data components in a report

You can apply filters to a page report so as to narrow down the data displayed in the report. The filters can be applied to the business views used by data components such as banded objects, tables, crosstabs and charts in the report, or to the data components themselves.

Applying filters to business views

For data components created on business views or converted to use business views in a page report, you can apply filters to the business views they use to narrow down the data scope of the business views. Filters for business views are defined into two categories in Page Report Studio: predefined filters and user defined filters. As the name suggests, predefined filters are defined on business views in advance in JReport Designer, and user defined filters are created on business views while they are used in Page Report Studio.

Business view filters are defined on the component level in Page Report Studio, which means each time you create a component, you can apply a filter to the business view it applies without affecting other components based on the same business view.

A JReport Live license for JReport Server is required in order to use this feature. If you do not have the license, contact your Jinfonet Software account manager to obtain it.

To apply a filter to the business view a data component uses:

  1. Select the component by clicking anywhere in it, and then clicking the icon Drag icon at the upper left corner of the component.
  2. Click Menu > Report > Query Filter, or right-click the component and select Query Filter from the shortcut menu to display the Query Filter dialog.

    All the predefined filters of the business view the data component uses are listed in the Query Filter drop-down list. Choose the one you want to apply. If you want to further edit the filter, click the Edit button and then redefine the filter as required. The edited filter will then be saved as a user defined filter to the business view.

    If you prefer to define a filter on your own, select User Defined from the Query Filter drop-down list, then define the filter according to your requirements.

    There are basic and advanced modes of the dialog for you to define either simple or complex filter expressions.

  3. Click OK and the specified filter will be applied to the business view. Only data that meet the filter condition are fetched from the business view and displayed on the data component.

    If the special field User Name is used in the filter condition, the user name used to log onto JReport Server will be applied to compose the filter expression; if a parameter is used, after clicking the OK button you will be prompted to specify the parameter value to dynamically define the filter condition.

You can also apply a filter to the business view a data component uses in the Query Filter screen of the report wizard while creating the data component.

Filtering the data components in a report

When applying filters to the data components themselves in a page report, there are the following ways you can take: using the Filter dialog, using filter controls, and using shortcut menu.

Using the Filter dialog

To set the filtering conditions using the Filter dialog:

  1. Click Menu > Report > Filter, or the Filter button Filter button on the toolbar. The Filter dialog appears.

    Filter dialog - Basic mode

  2. Select the component on which the filtering will be based from the Apply to drop-down list.
  3. Define the filter using either simple or complex filter expressions. Filtering by field is not supported here.
  4. Click OK to make the filter take effect and return to the report.

Using filter controls

A filter control is a web control used to filter one or more data components in a report using the same data source. A filter control can do filtering based on one field or multiple fields of the same data type. For details, see Using Filter Control to Filter Report Data.

Using shortcut menu

You can use filter-related commands on the shortcut menu to filter the data in a banded object or table. To do this, point to any value of a field other than the group-by field by which you want to filter data, then right-click to show the shortcut menu. You will see the Filter item which provides a submenu containing the following commands:

Filter Item Submenu

After a filter is applied using the Filter shortcut menu, if you open the Filter dialog you can find that the corresponding filter expression displays in the dialog.

Tip: You can customize the following filter-related features for a page report using JReport Designer:

BackPrevious Page Next PageNext