Editing Report Filters
Filters let you limit the data returned by a report.
For a report on cases, you typically do not want the report to return every case in your database, but a limited, or filtered, set of those cases - like open cases, or cases closed within a certain date range, or cases with specific legal problem codes.
The Filters section allows you to add and remove the filters users will see when they run a report, and set sensible default values. People running the report will be able to select different values (unless you have locked a filter).
In this Article:
- Display Current Filters and any Defaults
- Adding and Removing Filters
- How Filters are Applied
- Filter Options
- Locking Filters
- Hiding Filters
- Create an OR Filter
Display Current Filters and any Defaults
When someone ran that report, it would initially display "Cases closed with A or B in the current year". They could change the Gender filter to also limit the cases returned to those where the client's Gender is "Female", County of Residence is "Bucks", etc.
Changing filters in Run mode does not change the filters on the underlying report. Run mode changes are temporary. Compare: If you (a report editor) change a filter in Edit mode, that will change the report (assuming you remember to Save Changes).
Adding and Removing Filters
To remove a filter, click the pencil icon, then the "Delete" button in the properties window. Deleting a filter does not delete that field from the report.
There are two ways to add filters to a report:
- Click the pencil icon on a column to open the properties window and Click the "Add Filter" button; or
- Scroll to the bottom of the Filters section and use the "Add Filter" dropdown to select a field. Only fields that have been added to the report will appear in the list, but they can be hidden or displayed fields.
How Filters are Applied
Note the "AND" at the top of the Filters section in the screenshot above. The report will only return data that meets the conditions in all the filters -- in this example, only cases that have a Date Closed in the current year AND have Disposition set to Closed AND have Close Reason set to A or B.
Some filters, like the Close Reason example above, allow you to select multiple values. Multiple values *within* a filter will return results if either (or any) of the conditions are met. In the example, the report would return a case if the Close Reason was either A or B.
See Creating an OR Query below for information on creating OR conditions between filters.
Filter Options
Each filter has several options. Some are common across all filters, others will vary depending on the type of field that is being filtered.
Filters appear in alphabetical order by Label in Run mode, but not in Edit mode.
Filters have different options depending on the type of data being filtered:
Lookup fields like Close Reason above, present a search and select Values box:
Check the "Exclude" box to exclude the items you select. Many lookup field filters will also have a "Show Inactive" checkbox to allow filtering on inactive lookup values. As with all filters, your selections will be the default selections users will see when they run the report. They will be able to change the default selections (unless you have locked the filter).
- Date fields have several helpful Date Presets like Current Month, Previous Month, Current Year, Previous Year, etc. Using the presets can save time in running certain reports. If you run a report at the beginning of the month for cases closed in the previous month, using the Previous Month filter will automatically select the previous month's dates each time you run the report.
- Numeric fields have filter options like Between, Greater Than, Less Than, etc. The "Between" data points are inclusive; for example "0 to 125" will include 125.
- Text fields default to providing a filter that allows entering a list of comma separated values. Other options are "Contains", "Does not Contain", etc. "Contains" is typically the most useful (most easily understood by users). We recommend using the "Label" option to make it clear what type of search will be done. For example, a 'contains' filter on the outreach Name field should have a label like "Outreach Name (contains the text)".
Locking Filters
The Viewer Modifiable checkbox determines whether someone running the report can change the filter. You can uncheck this box to "lock" a filter:
Hiding Filters
You can keep a filter from displaying at all in Run mode by unchecking "View Modifiable", then checking "Advanced".
This is also a workaround for "Is Null" and "Is Not Null" displaying a confusing "not supported" message in Run mode.
Creating an OR Filter
Filters are joined by an AND by default. For example, the following will only return a case if the Date Closed is in the specified range AND the Legal Problem Code is Domestic Abuse AND Citizenship Status is one of the 2 values:
By dragging and dropping the Citizenship Status filter onto the Legal Problem Code filter, an OR condition (or OR query if you prefer) can be created:
If you prefer parentheses: Date Closed AND (Citizenship Status OR Legal Problem Code)
When you initially group two filters together, the join type will be AND. Click the AND to change it to an OR.
You can drag a filter out of a group to break the OR condition.