Purpose
The control break columns only control what groups of data get totaled on the report. They do not control which columns get totaled. That specification occurs in the PRINT statement when you enclose a column name in parentheses.
Sample
You do not need to include the control break column in the PRINT statement to display the totals for accumulated columns. In the following query, the control break column ORD-ID is not included in the PRINT statement.
FIND 10 CAI-SLSHST-REC ROWS
WITH SHIP-QTY > 100
RELATED BY SLMN-ID TO CAI-ORDERS-REC
SET NET-COST (8.2) = CAI-SLSHST-REC SHIP-QTY * UNIT-PRICE
SET DISCOUNT (5.2) = NET-COST * DISC-PCT
SORT CAI-ORDERS-REC BY (ORD-ID) AND
CAI-SLSHST-REC BY SHIP-QTY
PRINT FROM CAI-SLSHST-REC ITM-ID
SHIP-QTY
UNIT-PRICE
(NET-COST)
DISCOUNT
Output
Following is the output when the control break column is not included in the PRINT statement.
=> 01/02/2010 CA Dataquery PAGE 1 15:32:34 DETAIL ITM-ID SHIP-QTY UNIT-PRICE NET-COST DISCOUNT ---------- -------- ---------- ------------- --------- O50006 0000203 00014.75 00002994.25 00010.00 TOTAL ORD-ID 08811 * 00002994.25 * GRAND TOTAL * 00002994.25 -------------------------------- LAST PAGE ------------------------------------ <PF1> HELP <PF2> RETURN <PF3> TOTALS ONLY <PF4> DETAIL <PF5> NO TOTALS <PF6> STATS <PF7> BACKWARD <PF8> FORWARD <PF9> NOT USED <PF10> NOT USED <PF11> LEFT <PF12> RIGHT
In the preceding sample screens the subtotal lines provide the name of the control break column and the information in the column. This allows you to identify the order number and the accumulated subtotal for that order.
|
Copyright © 2014 CA.
All rights reserved.
|
|