A Filter is a set of conditions that excludes from the Report panel any line that does not meet all conditions.
There is only one filter active at a given time, but it can hold any number of conditions acting together. The filter is defined or modified by using the Filter dialog. To call the dialog, select Filter from the context menu in the Report panel. If the filter is defined, you can also press the Customize button at the bottom the panel.
Each line in the dialog is one filter expression, or condition. Existing lines can be edited in place. To add a new line, do any of the following:
- Press the button at the bottom of the condition list (the button's caption is press the button to add a new condition). This will create a condition on the same level as the last one.
- Press Ins. This will create a condition on the same level as the selected one.
- Click the ellipsis button to the left of an existing condition and in the resulting menu select Add Condition. This will create a condition on the same level as the selected one.
- Click the Filter button and in the resulting menu select Add Condition. This will create a condition at root level.
You can then edit the new line in place. For each condition line there are several columns. Each column holds a dropdown list from which you select a value, except for the last column, which is an edit box for the value.
In the first column, specify a field to be used in the condition. A field is a Report column name, and the dropdown list offers you all the available columns for the current profiler.
In the second column, specify a comparison operator. The set of available comparison operators depends on the type of the selected field. For instance, for string fields you can use the like and not like operators.
In the last column, type in the threshold against which the comparison will be made. For instance, Hit Count is greater than 10 means that only lines with a Hit Count value 11 or over will be displayed. Do not use quote marks for strings, unless the quote mark is part of the actual string.
If you use the like or not like operator, you may use the _
and %
wildcards in the filter value to create search patterns. The _
character is used as a pattern for any single symbol; %
- as a pattern of a string of any symbol.
Note that for the comparison operators is blank and is not blank there is no value at all, while for between and not between there are two values that must be specified.
If there are several conditions, they are linked to each other logically. To do this, any of the following operators can be used:
- AND (all the conditions linked with AND must be true)
- OR (at least one of the conditions linked with OR must be true)
- NOT AND (at least one of the conditions linked with AND must be false)
- NOT OR (all the conditions linked with OR must be false)
The logical operator that links conditions of the root level is specified at the top of the Filter dialog.
Using the Filter dialog, you can create filters that include complex conditions. This can be achieved by using condition groups. Like conditions of the root level, a condition group unifies several conditions linked to each other with the same logical operator, but the entire group is linked to other conditions or groups with a different operator. This can be necessary to built expressions like the following:
((Class Name = Board) AND (Hit Count > 0)) OR ((Module Name = Base) and (Time >= 2.5))
To create a condition group, do any of the following:
- To create a group for conditions of the root level, click the Filter button and in the resulting menu select Add Group.
- To create a group linked to the selected condition or group, click the ellipsis button to the left of this condition (group) and select Add Group from the menu.
Conditions of a group occupy the filter level below the level of the condition or another group this group is linked to. The logical operator that links conditions in a group is specified at the group row (its caption ends with applies to the following conditions). At that, the logical operator that links the entire group to other conditions or groups is specified by the operator at the previous level.
To delete the selected condition or group, click the ellipsis button to the left of it and in the subsequent menu select Remove Row. Note that if you delete a row that has other rows linked to it, all of the rows below the selected one will be deleted as well. To remove all of the conditions and group rows from the current filter, click the Filter button and select Clear All from the menu.
You can save the current filter to a file with the .flt extension for future reuse. To do this, press Save As and specify the target file. To load the filter from a previously saved .flt file, press Open and locate the desired file.
To apply the filter and the changes you have made in the dialog, press OK. To close the dialog without saving any changes, press Cancel.