## Edit Sort and Filter dialog

This dialog appears when you select Report > Edit Sort and Filter. It helps you to predefine the sort and filter conditions for viewing reports in JReport Web.

Note: The Sort and Filter conditions you defined in the dialog work for JReport Web only, and will not affect the preview result in JReport Designer.

This dialog consists of the following two tabs:

- Sort tab
- Filter tab

Edit Display Name

Opens the Edit Display Name dialog to add or remove display name fields.

OK

Accepts the changes you've made and closes this dialog.

Cancel

Does not retain any changes and closes the dialog.

Help

Displays this help document.

### Sort tab

Defines the sorting conditions. See the tab.

Fields

Lists all fields that are available to be sorted on.

Sort By

Lists the fields that are selected. Report data will be sorted according to the sort by fields you selected.

Adds the selected fields in the Fields box to the Sort By box.

Removes the selected fields from the Sort By box.

Moves the selected field up one step. The order of the sort by fields determines the order in which the report data will be sorted.

Moves the selected field down one step.

### Filter tab

Defines the filtering conditions. See the tab.

Add Condition

Adds a new condition line.

Delete

Deletes the selected condition line.

Group

Makes the selected conditions in a group. Conditions can also be added to an existing group by selecting the conditions and the group while holding the Ctrl button, and then clicking the Group button.

Ungroup

Makes the selected condition ungrouped.

Up

Moves the selected condition or group up to a higher level.

Down

Moves the selected condition or group down to a lower level.

Logic

Lists the logic operator.

- And
  Logic operator And which is applied to this and the next line.
- Or
  Logic operator Or which is applied to this and the next line.
- And Not
  Logic operator And Not which is applied to this and the next line.
- Or Not
  Logic operator Or Not which is applied to this and the next line.

Field

Specifies the field to be filtered.

Operator

Specifies the operator to compose the filter expression.

- =
  Equal to
- >=
  Greater than or equal to
- >
  Greater than
- <
  Less than
- <=
  Less than or equal to
- !=
  Not equal to
- [not] like
  Like string pattern matching operator is used to compare the first expression string value to the pattern string (the second expression). If you want to use wildcard character in the pattern string, only "_" and "%" are supported.
- [not] in
  Causes an enumerated list of values to appear in the WHERE clause predicate, used for evaluating for a true condition. For operator ‘in' or ‘not in', it is allowed to input multiple values in the Value input box and separate the values with comma (,).
- [not] between
  Allows the system to evaluate whether or not data values are located between a range of values indicated in the predicate. For operator ‘between' or ‘not between', there are two value input boxes for inputting the same type of values.
- is [not] null
  It is used in WHERE clause predicates to match null values occurring in a specified data field. For operator ‘is null' or ‘is not null', the value input box is hidden.

Value

Specifies the value of how to filter the field. When you type in the value manually, if multiple values are required, they should be separated with ",", and if "," or "\" is contained in the values, write it as "\," or "\\".

SQL Statement

Displays the SQL statement of the filter condtions.

###### Related topics:

- Predefining sort and filter conditions