Aggregate |
Used to define attributes or other data that will be automatically accumulated while a supported iterative block is executing. For aggregates, values are provided sensitive to the context; if in a second level control break or footer accesses accumulators, they will provide values proper for that section. This includes any total section. Example: <<Aggregate: CountShipped,ValueShipped>> The name parameters are assumed to be property names belonging to the objects being iterated. The example above accumulates the numeric values of the named attributes (SUM). You may also calculate MIN, MAX, AVERAGE, COUNT or Non-Zero MIN for an attribute. Finally, while the attribute name itself can be used to access the calculated value in a simple case, you can also provide a variable name for the calculated value itself. Example: <<Aggregate: amount as totalAmount, cost, max:cost as maxCost, min:cost, average:cost, average:amount >> In the example above, min:cost is not provided a name override. It is accessed in this manner: <<#min:cost,Currency>> |
---|---|
Set |
Used to set the value of a variable. In the releases prior to version 17, the set command supported only simple assignments or a 2 operand equation with a single operator. In release 17 and later, the source equation is processed by the same Equation Processor used for Calculated Attributes and Triggers, and can now process much more complex equations with full function support. Examples: <<Set: totalAmount = 1 >> <<Set: totalAmount = #totalAmount + 25 >> <<Set: calc = (@totalamount + @backordered + @fulfilled)/@totallines >> <<Set: formattedDateOpened = FormatDateTime(DateOpened; "yyyy-MM-dd")>> The assignment target MUST be a variable not using the # prefix or result in an error; however, since source equation operands can come from any data source, the # sign is used to designate the reference of a variable. “@” prefixes WV attribute values, etc. See Attributes and other Data Values for more information about data values. |
Variables |
Declares variables by simple name that will be used within the template. Variables are not declared with a type; type is determined by what is stored within. Example: <<Variables: count, totalAmount >> |