DQHD0
=> Press <PF4> if you do not wish to define sort criteria --------------------------------------------------------------------------DQHD0 DATAQUERY: SORT CRITERIA DEFINITION QUERY NAME: USER-SAMPLE ------------------------------------------------------------------------------- You may order the selected rows in ascending or descending sequence according to the contents of one or more columns. Select the columns by placing any character next to the desired names. ------------------------------------------------------------------------------- SELECT | TABLE NAME/KEY (*) OR COLUMN NAME | DESCRIPTION ------------------------------------------------------------------------------- | CAI-DETAIL-TBL | _ | * ITM-ID-KEY | DETAILS ITEM-ID SECONDAY KEY _ | * ITM-ID | _ | * ITMID-ORDID-KEY | ITMID & ORDID SECONDARY KEY _ | * ITM-ID | _ | * ORDID-ITMID-KEY | DETAIL ORDID & ITMID KEY _ | * ORD-ID | _ | * ORDID-KEY | ORDER ID KEY _ | * ORD-ID | ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> NOT USED <PF4> CONTINUE <PF5> EXTEND COLUMN <PF6> DISPLAY QUERY <PF7> BACKWARD <PF8> FORWARD
Purpose
The optional SORT CRITERIA DEFINITION panel allows you to order rows in your report in ascending or descending sequence according to the contents of one or more table columns or temporary results. With this capability, you can group rows together for purposes of reporting. Also, when you sort data, you can make reports easier to read. You can also allow for subtotals, should you decide to apply them. More about that in the next step.
You can perform a simple sort or a complex sort. With a complex sort you could sort data within each logical group. For instance, if you are reporting names and addresses, you can arrange your report alphabetically by State, then within each state you can sort the rows by City, and then within each City, you can sort the rows alphabetically by Name. In this case, State is the major sort key; City, the intermediate sort key; and Name, the minor sort key.
Concept
This is the major concept related to this panel:
Sort Criteria
Report data can be sorted out to 10 levels, based on the columns of the table selected in the query. If you select more than one column for sorting, you will be asked to define the sorting priority, from major to minor.
Panel Operation
On this panel, you use the Tab key to move the cursor from one field to another. You enter a character in the field next to the column name or key name of your choice and press <PF4> CONTINUE to display the next panel.
Completed Example
The following shows how the completed SORT CRITERIA DEFINITION panel selects the column for sorting.
=> Press <PF4> if you do not wish to define sort criteria --------------------------------------------------------------------------DQHD0 DATAQUERY: SORT CRITERIA DEFINITION QUERY NAME: USER-SAMPLE ------------------------------------------------------------------------------- You may order the selected rows in ascending or descending sequence according to the contents of one or more columns. Select the columns by placing any character next to the desired names. ------------------------------------------------------------------------------- SELECT | TABLE NAME/KEY (*) OR COLUMN NAME | DESCRIPTION ------------------------------------------------------------------------------- | CAI-DETAIL-TBL | _ | * ITM-ID-KEY | DETAILS ITEM-ID SECONDAY KEY X | * CUST-ID | _ | * ITMID-ORDID-KEY | ITMID & ORDID SECONDARY KEY _ | * ITM-ID | _ | * ORDID-ITMID-KEY | DETAIL ORDID & ITMID KEY _ | * ORD-ID | _ | * ORDID-KEY | ORDER ID KEY _ | * ORD-ID | _ | ORD-ID | ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> NOT USED <PF4> CONTINUE <PF5> EXTEND COLUMN <PF6> DISPLAY QUERY <PF7> BACKWARD <PF8> FORWARD
This chart explains each entry/selection.
|
Field or Item |
Sample Entry |
Reason |
|---|---|---|
|
CUST-ID |
X |
To report and total results for individual customers. The data in the CUST-ID column identifies the customer for each individual order. |
Options
You could sort your report data by customer, and then by item ordered for this report. Or, you could also specify a sort on the temporary result SHIP-QTY, and arrange the rows in descending order from highest amount shipped to lowest for each customer. There are many ways to sort the data. If you have a need, CA Dataquery can probably fill it.
Note: For More information about rules for sorting can be found in the CA Dataquery Reference Guide.
To Go to the Next Step
Once you select one or more columns to control report sorting, you are ready to tell CA Dataquery in detail how to perform the sorts. Press <PF4> CONTINUE to go on.
|
Copyright © 2014 CA.
All rights reserved.
|
|