Configuring a Report to Allow Filtering at Runtime

Last 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.

Example

The goal of this example is to:

  1. Create a report with a filter for Folder Type Name Contains.
  2. Enable runtime filtering for this filter.
  3. 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.

    createReport                   

In the resulting pop-up window, give the report a name and click Ok.

 nameReport

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.

 dragFolderDataSource

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.

 dragFolderTypeNameFilter

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.

 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.

 dragEntityName

Now add the column that will be filtered, Folder Type Name, as well as Nesting Level.

 dragMoreColumns

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.

 runReport

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.

 reportOpens

Enter “folder” into the field….

 enterFolder

… the report displays only those entities which have the filter term “folder” in the Folder Type Name column.

 onlyFolders

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.

onlyDesigner

 

Additional Resources