4D v16.3Sorting report records |
||
|
4D v16.3
Sorting report records
Sorting report records
An important feature of the Quick Report editor is the ability to sort the records in your report. You sort records for two reasons:
You can specify a sort order at any time; simply drag and drop a column into the Sort order list. For example, if you wanted to sort the records of salespeople by the Sales Region field, you would drag and drop the Sales Region column into the Sort order area. You can also sort based on a formula by selecting the column that contains the formula and placing it in the Sort order list. For more information about adding formulas to quick reports, refer to Associating formulas with a quick report. You can sort a report on several levels. The order in which the fields and formulas appear in the Sort order list indicates the sort level. To specify the sort order using the field list:
To specify a sort for a column (field or formula):
To change the level of a sort:
You can delete any field or formula from the Sort list. To remove a field or formula from the Sort order:
The level is then removed. Note that the associated column is not removed from the report. On the other hand, the associated subtotal row disappears. In a Cross-table report, the only values that can be sorted are the horizontal and vertical data sources (the two data sources that are used as categories in the final table). To sort the categories in a cross-table report, click the sort indicators in the Sort order area. An arrow indicates the sort order specified:
To modify or delete the sort order of a data source, click on it again. The different possible reports appear successively. When no arrow is displayed, no sort order is selected. In this case, values will be displayed in the order they appear in the selection. In a quick report, you set break levels to separate or “break” records into groups according to values in one or more sort fields. A break area is printed at each break level. You can print summary calculations in the break area. The summary calculations — sum, average, minimum, maximum, count and standard deviation — are calculated for each group of records. Break levels are determined by the sort levels and Break rows. For example, if you sort records by Sales Region, 4D inserts a break between each group of records that have the same sales region. These rows are automatically inserted when a sort is defined. After you add a subtotal row to the quick report, you can request summary calculations on each break. For example, you can insert a summary calculation in a subtotal row to display subtotals for sales from each state in a marketing region. For more information about adding summary calculations to Subtotal and Total rows, refer to Adding summary calculations. The label of a subtotal row indicates which change in value triggers the break. You can improve the appearance and clarity of your reports by labeling each Subtotal row using the value of the Break field. To request that the value of a Break field be printed in a label placed in the Break area, use the number sign (#) in the label. For example, the text “Total salaries for # department” will insert the department name (in this case, the value of the Department field) in place of the number sign when the report is printed. The number sign does not need to be placed in the same column as the Break field. It will display the value of the Break field in any cell in the Subtotal row. The following figure illustrates the use of the number sign in a label in the Subtotal row: You can configure subtotal rows in order to control the page layout and appearance of the quick report. For example, you can generate a page break after each subtotal. The subtotal page layout options can be used to visually set apart the different parts of the report. To set the spacing for a subtotal row:
|
PROPERTIES
Product: 4D
HISTORY
ARTICLE USAGE
4D Design Reference ( 4D v16) |