Report filters are fields used for filtering data in the report. Members of such fields are not displayed on the grid and charts, which is useful if you want the report to look neat and uncluttered.
Report filters can be added only via the compact form, the classic (tabular) form, and the chart view. In the drill-through view and the flat form, the existing report filters are displayed in columns.
To use report filters for showing different data subsets, apply the conditional or selection filters to fields in report filters. Otherwise, report filters do not affect which data is displayed, so there is no point in using them.
Note Value filter is not compatible with the report filters.
Report filters are available for all data sources.
Note For the custom data source API, the conditional or the selection filter must be implemented on your server in order to be applied to report filters. For more details, refer to the Implementing filters guide.
Report filters can be:
Step 1. Open the Field List using the diagonal arrow in the upper-right corner of the grid or the charts. If you have the Toolbar embedded, you can also use the Fields Toolbar tab.
Step 2. Drag the required fields to the Report filters box. Click APPLY once you are finished.
Step 3. Apply the conditional or the selection filter to the selected fields. You can find the fields:
Step 1. Specify fields for report filters in the slice.reportFilters property:
slice: { reportFilters: [{ uniqueName: "Color" }], // Slice configuration }
Step 2. Apply the conditional or the selection filter to the specified fields:
slice: { reportFilters: [{ uniqueName: "Color", filter: { members: [ "color.[yellow]", "color.[white]" ] } }], // Slice configuration }
To add or change report filters at runtime, use the runQuery() API call:
let slice = {
reportFilters: [{
uniqueName: "Color",
filter: { members: ["color.[green]"] }
}],
// Slice configuration
};
pivot.runQuery(slice);
You can view fields from report filters using the getReportFilters() and getReportFiltersAsync() API calls.
Note To prevent changes to filter configurations in the report filters, use the grid.showReportFiltersArea and chart.showFilter options.