Configuring a Report to Allow Filtering at RuntimeLast Updated: 08/12/2016 Introduced in Verision: 2.0
A report’s filter can be static, meaning it cannot be changed by a user at runtime. A report’s filter can also be set to allow the user to enter filter criteria while viewing the report.
To configure a report to allow filtering at runtime, in the Report Designer, select the filter that should allow runtime filtering and click the Edit at Runtime checkbox in the Properties Panel.
The goal of this example is to:
- Create a report with a filter for Folder Type Name Contains.
- Enable runtime filtering for this filter.
- Run the report and view the filter in action.
To begin, navigate to a Designer folder, click the Create Report button then select Create Report.
In the resulting pop-up window, give the report a name and click Ok.
In the Report Designer, add a data source to the report.
In the Toolbox Panel, expand the category Data Sources > Common and drag a Folder Data Source component to the Sources list.
Next, add an additional filter to the report that the user will be able to filter at runtime.
In the Toolbox Panel, we expand the Data Filters > Field Filters > Folder Type Name and drag a Folder Type Name Contains component to the Filters list. For this filter to work, later add a Folder Name Type column to the report.
With the Folder Type Name Contains filter selected, in the Properties Panel, under Settings in the drop down menu for Runtime Behavior, select Runtime Editable.
Next, add columns to the report.
In the Toolbox Panel, expand the Folder Data Source category and drag an Entity Name component into the workspace.
Now add the column that will be filtered, Folder Type Name, as well as Nesting Level.
The report is now complete. Save the report and close the Report Designer.
To view the report and apply a filter at runtime, select the report’s thumbnail and select Run Report from its Action menu.
The report opens. In the upper right area, a text field is displayed. To apply a filter, click into the field and enter the criteria.
Enter “folder” into the field….
… the report displays only those entities which have the filter term “folder” in the Folder Type Name column.
To change the filter criteria, enter it into the field. This time, enter “Designer” in the Value field and the report displays only those entities with “Designer” in the Folder Type Name column.