A slider or filter control is used to filter one or more data components in a report or library component. It can do filtering based on the fields in the data sources the data components are created from.
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 data sources 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 report, 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, then click OK. The filter tool will be inserted in the report, 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 data source. 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 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.
Slider is only available for library component at present and can only be inserted into the body of a library component.
To insert a slider into a library component:
The Insert Slider dialog appears. See the dialog.
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.
See also Insert Slider dialog for details about options in the dialog.
After a slider is inserted into a library component, you can further modify it if necessary. To do this, right-click the slider and select Edit Slider from the shortcut menu. In the Edit Slider dialog, edit the slider according to your requirements.
To insert a filter control into a report:
The Insert Filter Control dialog appears. See the dialog.
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.
See also Insert Filter Control dialog for details about options in the dialog.
When a filter control is inserted into a report, you can further modify it if necessary. To do this, right-click the filter control and select Edit Filter Control from the shortcut menu. In the Edit Filter Control dialog, edit the filter control according to your requirements.
After inserting filter controls in a 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.