Assigns the value of an expression to a string, numeric, date, or list (DDO only) variable.
String, numeric, date, or list (DDO only) variable or array field to which the result of the expression is assigned.
Valid expressions are formed as a combination of:
String, numeric, date, and array field operands can be used in an expression as well as embedded functions. Production Reporting supports a standardized set of mathematical operators and logical comparison operators working within a carefully defined set of precedence rules. Production Reporting also provides the user with a rich set of numeric, string, date, unicode, and file manipulation functions along with a number of special purpose utility functions. All combined, the Production Reporting expression provides the user with a very powerful tool that can be tailored to suit any information processing need. (Note that all string indices are one-based, not zero-based.)
The following examples show some complex expressions:
let #j = ((#a + #b) * #c) ^ 2 if #j > 2 and sqrt(#j) < 20 or #i + 2 > 17.4 while upper(substr(&descrip,1,#j+2)) != 'XXXX' and not isnull(&price) let #len = length(&fname || &initial || &lname) + 2 let $s = edit(&price * &rate, '99999.99') let summary.total(#j) = summary.total(#j) + (&price * &rate) if summary.total(#j) > 1000000 let store.total (#store_id, #dept) = store.total (#store_id, #dept) + #total let #diff = datediff(datenow(), strtodate('1995','YYYY'),'day') let $newdate = dateadd(datenow(),'month',50) let $date1 = datetostr(strtodate(&sale_date), 'Day Month DD, YYYY')
Production Reporting analyzes LET, IF, and WHILE expressions when it compiles code and saves the result in an internal format so that repetitive execution is at maximum speed.