Specifications

www.evisions.com Argos - Argos Report Writers Guide Page 55 of 118
Document Version 1.0 Last Updated 10.18.2010
Group By Expression
Example 3
Introduction
The previous examples illustrated how to group employees by department, where the
database field dept_name was used as the field to group by. It is also possible to group
where an expression defines the grouping criteria. This will be demonstrated in this
example where the employee list will be grouped by the first letter of the employee last
name. An expression will be developed to be used as the criteria for grouping.
The desired output is shown in the figure below
Figure 94Grouping by First Letter of Last Name
The steps to follow are:
Sort by Employee Last Name.
Create a Group Band and set its background color to light grey.
Create an expression to obtain the first letter of the last name and place it within the
Group-by-field or expressionbox.
Place the expression into the Group Band Header to highlight the groupings (see the
bold letters in the above figure).
Create the Basic Report
Begin by creating a report and within the Edit Reportdialog box click the Sort Tab and
sort by Employee Last Name.
Within the Edit Report dialog box, click the Design button to bring up the Band Report
Editor and create a simple report as shown in the figure below:
When grouping by a particular field
(Employee last name in this example), the
data must be sorted by the same field.