BackPrevious Page Next PageNext

Filtering Component Data

Filter control types

Filtering scenarios

Filter logic

Link relationship between filter controls

Inserting a text list

Inserting a single value slider

Inserting a range slider

Saving and using default values in filter controls

Filter controls are used to filter one or more data components in a dashboard. They can do filtering based on the fields in the business views the data components are created from.

The filters created via filter controls are referred to as on-screen filters.

Filter control types

There are three types of filter controls: text list, single value slider, and range slider.

Text lists allow you to pick one or more random values from a list and are used with categorical or nominal variables.  You can choose one or more values from anywhere in the list and there is no mean or median value calculation possible such as States and Countries.

Single value sliders allow you to select one single value from a list and suit for displaying a few values like quarters.

Range sliders allow you to pick multiple sequential values from a list and are used for interval variables such as dates, times, quantity and currency variables where the slider represents the scale from lowest to highest value and the middle represents the median value.

Think about what you need and choose the proper filtering tool.

Filtering scenarios

Both sliders and text lists have the same filtering mechanism.

Filtering based on one field is a common usage. Bind a field to a filter control, and then based on the field to filter the data of the components created from the same business view as the field.

You can also bind multiple fields to a filter control and the values of the fields will be displayed in the filter control. It functions similarly as you put each field in a separate filter control. The difference is that the fields and their values are hosted in one filter control instead of many. If there are same name values, they will be distinctive. The selection of a distinctive value will filter all the data components created using the business views that contain the bound fields to which the value belongs. The usage suits for fields with a few values and you need only one filter control.

Another special usage is to filter components using different business views. Choose a common field all the business views contain and then bind a filter control with the common field in all the business views, that is, select the common field under the nodes of all the business views. The name of the field does not need to be the same, only the values need to be the same.

For example, there are two components containing data from different business views, and you want to filter their data using one filter control. The precondition is that both business views have the field values you want to filter. For example, you would like the two components to show the data of a specific country. In order to do this, insert a filter control into the dashboard, then select both the country fields from the two business views (different business views may use different names for the country field, for example, business view 1 uses "Country", business view 2 uses "P_Country", in this case, you need to select both "Country" and "P_Country"), then from the Apply To drop-down list, select the two components you want to filter, and then click OK. The filter control will be inserted in the dashboard, and you can see it lists country names which come from the two business views. In the filter control select one or more countries, then the two target components will be filtered and only display the data of these selected countries.

When you bind a filter control with multiple different fields, be sure the list of values in each field match so that when you select a value, such as Country, P_Country and S_Country, it will match the appropriate country field in each business view. The logic is the values are OR that is Field1=SelectedValue1 or Field2=SelectedValue1 or Field3=SelectedValue1. Therefore, when Field1, Field2 and Field3 are used in different components you will see the records correctly in each components.

When you bind a filter control with multiple different fields which do not contain the same list of values such as Country, Region and Territory, at runtime after you select values in the filter control, the filter condition will use OR logic to apply the selected values to all the fields of the filter control, for example, Field1=SelectedValue1 or Field2=SelectedValue1 or Field3=SelectedValue1. In this case, when there are three fields but the list of values in each field do not match, the result will have no matching records for two of the components and therefore become blank components. We recommend that you use three different filter controls in cases like this.

Filter logic

After you select values in one or more filter controls in the current dashboard, a filter condition based on the selected values of the specified fields will be applied to the specified data components in the dashboard, each field affecting only the data components based on the same business view as the field.

The filter logic is as follows:

Link relationship between filter controls

By default, all the filter controls applied to the same data components in a dashboard 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 filter controls 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 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

Inserting a text list

To insert a text list filter control to the dashboard body:

  1. Click Show Resources Show Resources button on the toolbar to display the Resources panel.
  2. From the Toolbox node, drag Filter Control to the destination in the dashboard body. The Insert Filter Control dialog appears.

    Insert Filter Control dialog

  3. In the Title text box, input a title for the filter control which will be displayed on the title bar of the filter control.
  4. The Select Fields drop-down list lists all the group and detail objects in the business views used by the current dashboard. 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 Field

  5. By default, all values of the selected objects are used in the filter control. 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.

    For objects of Date/Time type, you can also specify a value using the Calendar button button.

    Customize Initial Values

  6. 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.
  7. From the Apply To drop-down list, specify which data components in the dashboard 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.

  8. Click OK. A text list filter control is then inserted in the dashboard body, 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.
  9. Select the values with which you want to filter the dashboard data. A filter condition based on the selected values is then applied to the specified data components in the dashboard.

    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.

    Filter Control

    To easily locate the values you want in the filter control, click the Sort Sort button button on the name bar to sort the values in the ascending or descending order. You can also make use of the quick search toolbar to search for the desired values. To display the toolbar, click Search button on the name bar. The button Clear button on the name bar is used to cancel the selection of values in the filter control. For detailed usage about the quick search toolbar, refer to Select Values dialog.

Inserting a single value slider

To insert a single value slider to the dashboard body:

  1. Click Show Resources Show Resources button on the toolbar to display the Resources panel.
  2. From the Toolbox node, drag Filter Control to the destination in the dashboard body. The Insert Filter Control dialog appears.
  3. In the Title text box, input a title for the slider which will be displayed on the title bar of the slider.
  4. From Control Type drop-down list, choose Single Value Slider.

    Single Value Slider

  5. The Select Fields drop-down list displays all the group and detail objects in the business views used by the current dashboard. Select the objects of the same data type based on which to create the slider, 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 slider.

    Select Fields Drop-down List

  6. By default, all the values of the selected objects will be available to the slider, which may be too many for a slider. 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.

    For objects of Date/Time type, you can also specify a value using the Calendar button button and specify a special function.

    Customize Initial Values

  7. 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.
  8. From the Apply To drop-down list, specify which data components in the dashboard 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 slider.

  9. Click OK. A slider will be inserted in the dashboard body, 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 slider.
  10. Specify a value with which you want to filter the dashboard data. A filter condition based on the selected value is then applied to the specified data components in the dashboard.

Inserting a range slider

To insert a range slider to the dashboard body:

  1. Click Show Resources Show Resources button on the toolbar to display the Resources panel.
  2. From the Toolbox node, drag Filter Control to the destination in the dashboard body. The Insert Filter Control dialog appears.
  3. In the Title text box, input a title for the slider which will be displayed on the title bar of the slider.
  4. From Control Type drop-down list, choose Range Slider.

    Range Slider

  5. The Select Fields drop-down list displays all the group and detail objects in the business views used by the current dashboard. Select the objects of the same data type based on which to create the slider, 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 slider.

    Select Fields

  6. By default, all the values of the selected objects will be available to the slider, which may be too many for a slider. If you want to customize the value list, check Customize Initial Values and then select the start value of the slider from the From drop-down list and the end value from the To drop-down list. For objects of Date/Time type, you can also specify a value using the Calendar button button and specify a special function.

    Customize Initial Values

  7. 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.
  8. From the Apply To drop-down list, specify which data components in the dashboard 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 slider.

  9. Click OK. A slider will be inserted in the dashboard body, 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 slider.
  10. Specify a value range with which you want to filter the dashboard data. A filter condition based on the selected value range is then applied to the specified data components in the dashboard.

Saving and using default values in filter controls

When the Use Default On-screen Filter Values feature is enabled for dashboards, each end user can save the values specified to the filter controls in a dashboard as the default values for the dashboard and for him. Next time when the user runs the dashboard, the saved values will be applied to the filter controls by default. The default values in filter controls work on a user-dashboard basis.

Notes:

BackPrevious Page Next PageNext