When creating or editing dashboards, you can filter component data using two types of web controls: sliders or filter controls.
Filter controls 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.
Sliders allow you to pick one or more 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.
Both sliders and filter controls have the same filtering mechanism.
Filtering based on one field is a common usage. Bind a field to a slider or filter control, and then based on the field to filter the data of the components created from the same data source as the field.
Another special usage is to filter components using different data sources. Choose a common field all the data sources contain and then bind a slider or filter control with the common field in all the data sources, that is, in the insertion dialog, select the common field under the nodes of all the data sources.
For example, there are two components containing data from different data sources, and you want to filter their data using one filter tool. The precondition is that both components have the field 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 slider or a filter control according to your requirement into the dashboard body, then in the insertion dialog, select both the country fields from the two data sources (different data sources may use different names for the country field, for example, data source 1 uses "Country", data source 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. The filter tool will be inserted in the dashboard body, and you can see it lists country names which come from the two data sources. In the filter tool 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 slider or 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 component. 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 component.
When you bind a slider or 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 slider or filter control, the filter condition will use OR logic to apply the selected values to all the fields of the slider or 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 tools in cases like this.
To insert a slider to the dashboard body:
To filter components created from the same data source, select a field in the data source.
To filter components created from different data sources via one slider, find a common field these data sources contain, then select the field in each of the data sources.
For details about the special functions, refer to Specifying special function for group by field in the JReport Designer User's Guide.
You can further modify the sliders inserted into a dashboard if you want. To do this, click on the title bar of a slider and select Edit Setting from the drop-down list. In the Edit Slider dialog, edit the setting as required.
To insert a filter control to the dashboard body:
To filter components created from the same data source, select a field in the data source.
To filter components created from different data sources via one filter control, find a common field these data sources contain, then select the field in each of the data sources.
To easily locate the values you want in the filter control, you can make use of its quick search toolbar. To display the toolbar, click on the field name bar. The button on the field 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.
You can further modify the filter controls inserted into a dashboard if you want. To do this, click on the title bar of a filter control and select Edit Setting from the drop-down list. In the Edit Filter Control dialog, edit the setting as required.
Notes: