Applying filters to business views
You can apply filters to business views and data components such as tables, crosstabs and charts of a web report so as to narrow down the data displayed in the web report.
When creating a web report, you can choose to apply filters to the specified business view to narrow down the data scope of the data component using the business view. Filters for business views are defined into two categories in Web Report Studio: predefined filters and user defined filters. As the name suggests, predefined filters are defined in advance when creating or editing the business views in JReport Designer, and user defined filters are created on business views while they are used.
Business view filters are defined on the component level in Web Report Studio, which means each time you create a component, you can apply a filter to the business view the component uses and it will not affect other components based on the same business view.
Filters can be applied to a business view in the report wizard.
When it is in the advanced mode, you can also choose to apply a predefined filter of the specified business view from the Query Filter drop-down list. If you prefer to define a filter on your own, select User Defined from the drop-down list, and then define the filter according to your requirements. You can also edit a predefined filter if required and save it as a user defined filter to the business view.

and then select a parameter from the drop-down list to specify the value dynamically and when the available parameters cannot meet your requirement, you can create a local parameter to use in the filter.Repeat this to add more filter expressions if required. To delete a condition line, click
on its left.

and then select a parameter from the drop-down list or create a local parameter to specify the value dynamically.To group some conditions, select them and click the Group button, then the selected conditions will be added in one group and work as one line of filter expression. Conditions and groups together can be further grouped. To take any condition or group in a group out, select it and click Ungroup. It is the equivalent of adding parenthesis in a logic expression.
To adjust the priority of a condition line or a group, select it and click the Up or Down button.
To delete a condition line or a group, select it and click the Delete button.
To filter the data components in a web report, you can take any of the following ways: using the Filter dialog, using filter controls, using the Filter panel. For tables you can also filter them via shortcut menu, column headers or labels.
When using the Filter dialog to filter report data, you can only make the filter applied to a specific data component in the current web report.
To filter report data using the Filter dialog:
on the toolbar. The Filter dialog appears.

Tip: For web reports created in JReport Designer, the default selected component and available components in the Apply to drop-down list are determined by the Default for Filter and Invisible for Filter Dialogs properties of the components in the web reports.
The Filter dialog provides an entry to all the filters used in the current web report. You can click the Inspector button to view the detailed filter information in the Filter Inspector dialog.
Filter controls can be used to filter one or more data components in a web report. For details, see Using filter control to filter report data.
The Filter panel on the left of Web Report Studio is used to filter data components in the current report. You can create as many filters as you want which resemble filter controls in the panel.
The filters created via the Filter panel are referred to as on-screen filters, the values of which can be saved as the default ones.
To use the Filter panel:

By default, JReport applies the filter to all the data components created using the business views in which the selected objects are contained. 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 when the filter is added in the Filter panel.
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.
The following shows more about working with the Filter panel:

You can use the buttons on the bottom of the Filter panel to deal with the value selection in the panel.
For each filter in the panel, you can manage it with the buttons on its title bar or the shortcut menu as follows:





Notes:
For tables you can use the filter-related commands on the shortcut menu to filter the data. To do this, point to any value of a detail 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:

You can use the filter button on any table column header to filter values in the column if the feature is enabled in the server profile. By default, the feature is disabled so you need to configure the profile before you can use it.
.
Click the button a filter list which contains the same items as the Filter submenu appears.

With JReport Designer, you can bind a label in a table with a field used in the table to enable filtering on the label by setting the label's Bind Column and Filterable properties. Then when running the table in Web Report Studio you can click the filter button beside the label to filter values of the bound field. This functions the same as via the table column headers.
When a label is bound with a field, if the Filter on Column Header feature is also enabled, the former has higher priority. For example, if you bind the label in column A header with the field in column B, when clicking the filter button on column A header, values in column B are filtered.
Tips:
Filters created via the Filter panel and filter controls in a web report are called on-screen filters. JReport allows you to save values for them as the default values.
When the Use Default On-screen Filter Values feature is enabled for web reports in the server profile, each end user can save the values specified to the on-screen filters as the default values for the report and for him. Then the next time when the user runs the report, the saved values will be applied to the on-screen filters by default. The default on-screen filter values work on a user-report basis.
By default, all the on-screen filters applied to the same data components in a report are interlinked. The link relationship is reflected on the filter values dynamically: selecting a value in one on-screen filter will result in that values which do not belong to the selected value, contain the selected value or relate to the selected value are grayed in all the other linked on-screen filters for distinguishing. For example, there is a filter control based on the field Country and another on City and they both are applied to the same table. When you select USA in the Country filter control, the values in the City filter control will change as follows if the control has scrollbar: the cities belong to USA are displayed in the upper area of the filter control, and the other cities are put in the lower area and grayed out. If the City filter control has no scrollbar, all the values remain their positions and the values not belonging to USA are grayed out. In both cases all the values are still selectable.
When using a filter control, you can determine whether or not to make the filter control apply the link relationship via the Link to Other Filters option.
Below is an example showing the logic of other linked on-screen filters:
When
Filter1 is applied to DC1, DC2, and DC3.
Filter2 is applied to DC1.
Filter3 is applied To DC2.
Filter4 is applied to DC2 and DC3.
The result:
For Filter1, other linked filters are Filter2, Filter3, and Filter4.
For Filter2, other linked filter is Filter1.
For Filter3, other linked filters are Filter1 and Filter4.
For Filter4, other linked filters are Filter1 and Filter3