Aggregate Functions | Dictionaries | Expressions | Programming with ReportWriter for .NET

The following functions can be used in a RecordBox, RecordArea, or FormattedRecordArea:

Function Examples Description
Add( a, b ) Add( SubTotal, Freight ) Adds two numbers together.
Divide( a, b ) Divide( Total, 12 ) Divides a by b.
Multiply( a, b ) Multiply( UnitPrice, Quantity ) Multiplies two numbers together.
Subtract( a, b ) Subtract( Total, Tax ) Subtracts b from a.
Abs( a ) Abs( Total ) Returns the absolute value of a.
Ceiling( a ) Ceiling( Total ) Returns the smallest integer that is not less than a.
Floor( a ) Floor( Total ) Returns the nearest integer that is less than or equal to a.
Negate( a ) Negate( Total ) Returns the negative of a.
Pow( a, b ) Pow( 2, 3 ) Returns the value of a raised to the power b.
Sqrt( a ) Sqrt( Number ) Returns the square root of the specified numeric expression.
Round( a, b ) Round( Total, Count ) Returns number a rounded to b decimal places.
Format( a, b ) Format( UnitPrice, "0.00" ) Formats a using the b format.
Left( a, b ) Left( Name, 1 ) Returns the first b letters from a.
Right( a, b ) Right( Name, 1 ) Returns the last b letters from a.
Concat( a, b ) Concat( FirstName, LastName ) Returns the concatenated string.
Len( a ) Len( Name ) Returns the length of the string.
Trim( a ) Trim( Name ) Removes the white space before and after the string.
ToUpper( a ) ToUpper( Name ) Changes all letters to uppercase.
ToLower( a ) ToLower( Name ) Changes all letters to lowercase.
SubString( a, b, c ) SubString( Name, 1, 4 ) Returns 'c' characters from string 'a' starting from position 'b'.
StrReverse(a) StrReverse( Name ) Returns a string in which the character order 'a' is reversed.
StrComp( a, b ) StrComp( FirstName, LastName ) Returns a value indicating the result of a string comparison.
Replace( a, b ) Replace( FirstName, "a", "b" ) Replaces all occurrences of a specified character or String with another specified Unicode character or String.
IsNull( a[, b] ) IsNull( FirstName ) Determines whether a specified value is null.
IIF( a[, b[, c]] ) IIF( GTE( 2, 0 ), FirstName, LastName ) Returns one of two values depending on the value of 'a'.
Year( a ) Year( OrderDate ) Returns the year from the date.
Month( a ) Month( "12/12/2006 4:11:05 PM" ) Returns the month from the date.
Day( a ) Day( OrderDate ) Returns the day from the date.
Hour( a ) Hour( "12/12/2006 4:11:05 PM") Returns the hour from the date.
Minute( a ) Minute( OrderDate ) Returns the minute from the date.
Second( a ) Second( "12/12/2006 4:11:05 PM") Returns the second from the date.
WeekDayName( a ) WeekDayName( "12/12/2006 4:11:05 PM" ) Returns a string indicating the specified day of the week.
DateAdd( datepart, number, date ) DateAdd( Year, 1, OrderDate ) Returns a new datetime value based on adding an interval to the specified date.
DateDiff( datepart, startdate, enddate ) DateDiff( Day, OrderDate, ShipDate ) Returns the number of date and time boundaries crossed between two specified dates.
EQ( a, b ) EQ( QuantityA, QuantityB ) Returns true if a is equal to b.
GT( a, b ) GT( QuantityA, QuantityB ) Returns true if a is greater than b.
LT( a, b ) LT( QuantityA, QuantityB ) Returns true if a is less than b.
GTE( a, b ) GTE( QuantityA, QuantityB ) Returns true if a is greater or equal to b.
LTE( a, b ) LTE( QuantityA, QuantityB ) Returns true if a less than or equal to b.
PV( a, b, c[, d[, e]] ) PV( Rate, Period, Payment, FutureValve, DueDate ) Returns the present value of an investment.
FV( a, b, c[, d[, e]] ) FV( Rate, Period, Payment, PresentValve, DueDate ) Returns the future value of an investment.
PMT( a, b, c[, d[, e]] ) PMT( Rate, Period, PresentValue, FutureValve, DueDate ) Returns a value specifying the payment for an annuity.
Rate( a, b, c[, d[, e[, f]]] ) Rate( Period, Payment, PresentValue, FutureValve, DueDate, Guess ) Returns a value specifying the interest rate per period for an annuity.

Functions can be set as the Field property of a RecordBox.

Functions are enclosed within pound signs in a RecordArea or FormattedRecordArea:

     Hello #FirstName# #LastName#, 
           Your order total is #Add(SubTotal,Freight)#.
     Sincerely,
     Order Department

See Also 

Aggregate Functions | Dictionaries | Expressions | Programming with ReportWriter for .NET