In this procedure, we will add two columns to the report’s
first output level, displaying incident queues and the number of incidents
in each queue.
- Expand the All Tables tree on the data dictionary and then
select Incidents.
- Select Queue (queue_id) on the right
side of the data dictionary and drag it to the design surface. The
field is added to the report as a column and is automatically named
Queue, but you can right-click the column to change the name and customize
other options.
- On the data dictionary, scroll down to the Functions tree
and expand it.
- Select Aggregate Functions and then
drag count(expr) onto the design surface. The Column Definition window opens where you select the field
you want counted.
![This figure shows the Column Definition window. In addition to the Heading and Description text-entry fields, the window contains an Available Columns/Functions pane on the left, and an Expression pane on the right.](images/column_definition_window_ex.png)
We will edit the
column’s expression to specify what records we want counted. In this
example, we want to count the incidents in each queue.
- On the left side of the window, expand .
-
Scroll down to Incident ID (i_id) and drag it to the text
between the parentheses on the right side of the window. After you do this, the column’s
expression will be count(incidents.i_id).
We want to count the records using this field since it's a unique identifier for
incidents as no two incidents share the same ID number.
-
To change the name of the column you're adding, enter the name you want in the
Heading field. For our example, you can enter Number of
Incidents.
- Click OK.
The new column automatically displays a count of all incidents
in each incident queue.
Results:
The first output level of the sample report now has two columns
displaying incident queues and the number of incidents in each queue.
For more information about adding output columns to reports and the
types of columns you can add, see Overview of Report Output Columns.