Including statistics in a custom AR System report
In the Statistics tab of the ReportCreator form, you can choose to define expressions that calculates statistics for the requests contained in the report. Use the Statistics tab to specify what type of statistics to include.
- From the Operation field, select the appropriate operation:
- Count — Tallies the number of requests.
- Sum — Adds up specified fields or the arithmetic relationship among fields.
- Average — Calculates the average of specified fields.
- Minimum — Calculates the minimum value for a specified field.
- Maximum — Calculates the maximum value for a specified field.
Except for Count, these operations can be applied only to numeric and date/time fields. Each operation can apply to the whole report, or to a group of requests in a report. Groups are defined in the Sorting tab.
- From the Expression field, select a field from the menu list to include as part of a statistic.
An expression is required for all statistical operations except Count. Whether you include an expression for a Count operation depends on how you want rows with null values to be counted.
If you are defining a Count operation that includes an expression, only rows with a value that is not null for the specified expression are counted when the report is run. If you are defining a Count operation that does not include an expression, all rows returned are counted, including those with null values.
The menu list displays all numeric or date fields in the form. Expressions can include any of the following values:
- Numeric fields
- Date fields
- Status history fields
The most commonly used keywords are $DATE$, $NULL$, $TIME$, $TIMESTAMP$, $USER$, and $WEEKDAY$. Keywords are case-sensitive and must be entered in all capital letters.
For reports to run properly in a browser, you must add a backslash to the keyword in the Expression field, for example, $\TIMESTAMP$.
You can type numbers directly into the Expression field, for example, 5.25, 33, and so on.
- Arithmetic operators (+, -, **, */, and % )
You can type arithmetic operators directly into the Expression field, similar to the way they are entered in the advanced search bar.
In the Label field, type the label to identify a statistic on the report. You can include any of the following control characters in a label field:
- From the Compute On field, select the scope of a statistic.
You can determine whether a statistic is calculated for the entire report, or for defined groups within the report by selecting the appropriate setting in the Compute On field.
- Report — Calculates the statistic for all entries in the report. The statistic appears at the end of the report.
- GroupN — Calculates a statistic for groups defined in the Sorting tab. The statistic appears below each group.
- In the Layout field, for the Windows platform only, specify how you want the results to be displayed in the report by choosing one of the following options:
- Single — Displays all the statistical results on one line.
- Multiple — Displays each statistical result on its own line.
- Column — Displays the result for each value at the bottom of the column of the field specified in the Expression field. Column is valid only for a column-formatted report.
The Layout field setting works with the Compute On setting to determine where a statistic appears on a report.