RDF lets you specify a field as a function or as a mathematical expression. For example, if the date is stored in the database as an alphanumeric value, the date must be formatted. You can include the value of ACTDT in the report using the $DATE function on the Detail fill‑in:
=>
‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ IDEAL : RPT DETAIL DEFN. RPT CUSTRPT (001) TEST SYS: DOC DISP Field Name, Literal, Sort Break Function Column Function, or L A L S I T M M A H W Command Arithmetic Expression V / V K N O A I V D ID Tab Edit Pattern L D L P D T X N G G TH ‑‑‑‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑ ‑ ‑ ‑ ‑ ‑ ‑ ‑ ‑ ‑ ‑‑ ‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑ ====== =========== T O P ======= = = = = = = = = = = == === ============= 000400 CUSTOMER.NAME _ _ _ _ _ _ _ _ _ _ __ ___ _____________ 000500 CUSTOMER.CITY _ _ _ _ _ _ _ _ _ _ __ ___ _____________ 000600 CUSTOMER.OPEN$ _ _ _ _ _ _ _ _ _ _ __ ___ Z,ZZZ,ZZ9.99 000700 $DATE('MM/DD/YY',; _ _ _ _ _ _ _ _ _ _ 08 ___ _____________ 000800 DATE=ACTDT,TEM='YYMMDD') _ _ _ _ _ _ _ _ _ _ __ ___ _____________ ====== ========= B O T T O M === = = = = = = = = = = == === =============
Two lines are required to enter the function and its operands. A semicolon after the last character on the first line of the function entry indicates continuation. Also, a width is required for a date. A compiler error occurs if you do not specify a width.
The program code does not have to include the function in a procedure or define a variable to contain the result. The function is specified on the Detail fill‑in and appears on the report output. You can define a name or label for the function. For example, you can assign FORMDATE as the label for the date function in the preceding example.
FORMDATE = $DATE('MM/DD/YY',DATE=ACTDT,TEM='YYMMDD')
You can then include the value n control break footings. See the section titled Headings and Footings later in this chapter for more information on using labeled expressions.
Note: The $OCC function is the only report function that you can specify as a field on the Detail fill‑in. $OCC prints the count of primary records.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|