Specifying special function for group by field

If the field which is added as the grouping criterion is of Numeric/String/Date/Time type, you can select a special function for the field in the Special Function column to group the data as required. This is called "grouping data by intervals" in JReport. It enables you to group data more clearly and logically, and to summarize data more effectively.

The following is a short description of each special function.

Functions for Numeric-typed group by fields

Function Description
None All the records that have the same field value will be displayed together as a group.
Up to 5 The records will be grouped by intervals of 5.
Up to 10 The records will be grouped by intervals of 10.
Up to 50 The records will be grouped by intervals of 50.
Up to 100 The records will be grouped by intervals of 100.
Up to 500 The records will be grouped by intervals of 500.
Up to 1000 The records will be grouped by intervals of 1000.
Up to 5000 The records will be grouped by intervals of 5000.
Up to 10000 The records will be grouped by intervals of 10000.

Functions for String-typed group by fields

Function Description
None All the records that have the same field value will be displayed together as a group.
For 1st letter The records, of which the field values' first letter is the same, will be grouped together.
For first 2 letters The records, of which the field values' first two letters are the same, will be grouped together.
For first 3 letters The records, of which the field values' first three letters are the same, will be grouped together.
For first 4 letters The records, of which the field values' first four letters are the same, will be grouped together.
For first 5 letters The records, of which the field values' first five letters are the same, will be grouped together.
For last 1 letter The records, of which the field values' last letter is the same, will be grouped together.
For last 2 letters The records, of which the field values' last two letters are the same, will be grouped together.
For last 3 letters The records, of which the field values' last three letters are the same, will be grouped together.
For last 4 letters The records, of which the field values' last four letters are the same, will be grouped together.
For last 5 letters The records, of which the field values' last five letters are the same, will be grouped together.

Functions for Date/Time-typed group by fields

Function Description
None All the records that have the same field value will be displayed together as a group.
For each second The records, of which the field values are in the same second, will be grouped together.
For each minute The records, of which the field values are in the same minute, will be grouped together.
For each hour The records, of which the field values are in the same hour, will be grouped together.
For each day The records, of which the field values are in the same day, will be grouped together.
For each week The records, of which the field values are in the same week, will be grouped together.
For each bi-week The records, of which the field values are in the same bi-week, will be grouped together.
For each half month The records, of which the field values are in the same half month, will be grouped together.
For each month The records, of which the field values are in the same month, will be grouped together.
For each quarter The records, of which the field values are in the same quarter, will be grouped together.
For each half year The records, of which the field values are in the same half year, will be grouped together.
For each year The records, of which the field values are in the same year, will be grouped together.
Customized function

In the special function list for all the above data types, there is an item called Customize. By selecting this item, you can define special functions.

See also Customized Function dialog for detailed information about options in the dialog.