Difference between revisions of "SUN Report Builder/Functions"

From Apache OpenOffice Wiki
Jump to: navigation, search
(blank tables)
Line 2: Line 2:
  
  
'''Datetime'''<br>
+
'''Rounding'''<br>
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Function Name'''''
 
| '''''Description'''''  
 
| '''''Description'''''  
 +
| '''''Parameters'''''
 
| '''''Example '''''
 
| '''''Example '''''
 +
 
|-
 
|-
| Date
+
| INT
|  
+
| Returns a number down to the nearest integer
 
|  
 
|  
 +
|}
 +
<br>
 +
'''Information'''<br>
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Function Name'''''
 +
| '''''Description'''''
 +
| '''''Parameters'''''
 +
| '''''Example '''''
  
 
|-
 
|-
| Datetime
+
| CHOOSE
|  
+
| Uses an index to return a value from a list of values.
 
|  
 
|  
  
 
|-
 
|-
| Day
+
| HASCHANGED
|  
+
| Checks, whether the columns specified by the given names has changed.
 
|  
 
|  
  
 
|-
 
|-
| Hour
+
| ISBLANK
|  
+
| Checks, whether the value is undefined (null).
 
|  
 
|  
  
 
|-
 
|-
| Month
+
| ISERR
|  
+
| Tells if the parameter is of error type but returns false if the error is of type NA.
 
|  
 
|  
  
 
|-
 
|-
| Now
+
| ISERROR
|  
+
| Tells if the parameter is of error type but returns false.
 
|  
 
|  
  
 
|-
 
|-
| Year
+
| ISEVEN
|  
+
| Checks whatever the value is an even number.
 
|  
 
|  
  
 
|-
 
|-
| Today
+
| ISLOGICAL
|  
+
| Checks whatever the value is of type Logical.
 
|  
 
|  
  
 
|-
 
|-
| Weekday
+
| ISNA
|  
+
| Tells if the parameter is of error type NA.
 
|  
 
|  
  
 
|-
 
|-
| Time
+
| ISNONTEXT
 +
| Checks whatever the value is not of type Text.
 
|  
 
|  
|
 
 
|}
 
<br>
 
 
'''Financial''' <br>
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Description'''''
 
| '''''Example '''''
 
  
 
|-
 
|-
| Financial
+
| ISNUMBER
 +
| Checks whatever the value is of type Number.
 
|  
 
|  
|
 
 
|}
 
 
<br>
 
'''Information''' <br>
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Description'''''
 
| '''''Example'''''
 
  
 
|-
 
|-
| Choose
+
| ISODD
|  
+
| Checks whatever the value is an odd number.
 
|  
 
|  
  
 
|-
 
|-
| HasChanged
+
| ISREF
|  
+
| Checks whatever the value is a reference.
 
|  
 
|  
  
 
|-
 
|-
| Information
+
| ISTEXT
|  
+
| Checks whatever the value is of type Text.
 
|  
 
|  
  
 
|-
 
|-
| IsBlank
+
| NA
|  
+
| Returns the constant error NA.
 
|  
 
|  
 +
|}
 +
<br>
 +
'''Date/Time'''<br>
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Function Name'''''
 +
| '''''Description'''''
 +
| '''''Parameters'''''
 +
| '''''Example '''''
  
 
|-
 
|-
| IsErr
+
| DATE
|  
+
| Returns the number of days since 01.01.1900
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Month
 +
| Day
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| IsError
+
| DATEDIF
|  
+
| Returns the number of years, months, or days between two dates.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Date2
 +
| Format
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| IsEven
+
| DATEVALUE
|  
+
| Returns date serial number from given text.
 
|  
 
|  
  
 
|-
 
|-
| IsLogical
+
| DAY
|  
+
| Returns the day of a date
 
|  
 
|  
  
 
|-
 
|-
| IsNA
+
| HOUR
|  
+
| Returns the hour (0 through 23) from a time.
 
|  
 
|  
  
 
|-
 
|-
| IsNonText
+
| MONTH
|  
+
| Returns the month of a date
 
|  
 
|  
  
 
|-
 
|-
| IsNumber
+
| NOW
|  
+
| Returns the current time
 
|  
 
|  
  
 
|-
 
|-
| IsOdd
+
| TIME
|  
+
| Returns the time
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Minute.
 +
| Second
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| IsRef
+
| TODAY
|  
+
| Returns the current date
 
|  
 
|  
  
 
|-
 
|-
| IsText
+
| WEEKDAY
|  
+
| Returns the day of week from a date.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Type
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| Na
+
| YEAR
 +
| Returns the year of a date
 
|  
 
|  
|
 
 
 
|}
 
|}
 
<br>
 
<br>
'''Logical''' <br>
+
'''Text'''<br>
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Function Name'''''
| '''''Description'''''
+
| '''''Description'''''
| '''''Example'''''
+
| '''''Parameters'''''  
 +
| '''''Example '''''
  
 
|-
 
|-
| And
+
| EXACT
|  
+
| Reports if two text values are exactly equal using a case-sensitive comparison.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Text2
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| False
+
| FIND
|  
+
| Returns the starting position of a given text.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Text
 +
| Index
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| If
+
| LEFT
|  
+
| Returns a selected number of text characters from the left.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Length
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| Not
+
| LEN
|  
+
| Returns the lengh in characters of the given value.
 
|  
 
|  
  
 
|-
 
|-
| Or
+
| LOWER
|  
+
| Returns the given text in lower case.
 
|  
 
|  
  
 
|-
 
|-
| True
+
| MID
|  
+
| Returns extracted text, given an original text, starting position, and length.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Start
 +
| Length
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| Xor
+
| REPLACE
|  
+
| Returns text where an old text is substituted with a new text within the start index and length range.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Start
 +
| Len
 +
| New
 +
|}
 
|  
 
|  
  
|}
+
|-
<br>
+
| REPT
'''Math''' <br>
+
| Returns text repeated Count times..
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
| '''''Function Name'''''
+
| '''''Parameter Description'''''  
| '''''Description'''''
+
| Count
| '''''Example'''''
+
|}
 +
|  
  
 
|-
 
|-
| Abs
+
| RIGHT
 +
| Returns a selected number of text characters from the right.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Count
 +
|}
 
|  
 
|  
 +
 +
|-
 +
| SUBSTITUTE
 +
| Returns text where an old text is substituted with a new text. If which is specified, only this occurrance will be replaced otherwise every occurrance will be replaced.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Old
 +
| New
 +
| Which
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| Average
+
| T
|  
+
| Returns the given text value or a zero lenght string for non text type.
 
|  
 
|  
  
 
|-
 
|-
| Even
+
| TEXT
|  
+
| Returns the given value as text.
 
|  
 
|  
  
 
|-
 
|-
| Odd
+
| LOWER
|  
+
| Returns the given text free of leading and trailing spaces. Internal multiple spaces are replaced by one.
 
|  
 
|  
  
 
|-
 
|-
| Sum
+
| UPPER
|  
+
| Returns the given text in upper case.
 
|  
 
|  
  
 +
|-
 +
| URLENCODE
 +
| Applies URL-Encoding to a text given in the first parameter using the encoding specified in the second parameter. If no encoding is given, ISO-8859-1 is assumed.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Encoding
 
|}
 
|}
<br>
 
'''Rounding'''<br>
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Description'''''
 
| '''''Example'''''
 
 
|-
 
| Int
 
 
|  
 
|  
|
 
 
 
|}
 
|}
 
<br>
 
<br>
'''Text''' <br>
+
'''Mathematical'''<br>
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Function Name'''''
| '''''Description'''''
+
| '''''Description'''''
| '''''Example'''''
+
| '''''Parameters'''''  
 +
| '''''Example '''''
  
 
|-
 
|-
| Exact
+
| ABS
|  
+
| Returns the absolute (nonnegative) of the value.
 
|  
 
|  
  
 
|-
 
|-
| Find
+
| AVERAGE
|  
+
| Average a list of numeric values.
 
|  
 
|  
  
 
|-
 
|-
| Left
+
| Even
|  
+
| Returns the rounding a number up to the nearest even integer.
 
|  
 
|  
  
 
|-
 
|-
| Len
+
| MAX
|  
+
| Returns the maximum from a set of numbers.
 
|  
 
|  
  
 
|-
 
|-
| Lower
+
| MIN
|  
+
| Returns the minimum from a set of numbers.
 
|  
 
|  
  
 
|-
 
|-
| Mid
+
| MOD
|  
+
| Returns the remainder when one number is divided by another number.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| Divisor
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| Replace
+
| ODD
|  
+
| Returns the rounding a number up to the nearest odd integer.
 
|  
 
|  
  
 
|-
 
|-
| Rept
+
| SUM
|  
+
| Sum a list of numeric values.
 
|  
 
|  
 +
|}
 +
<br>
 +
'''Logical'''<br>
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Function Name'''''
 +
| '''''Description'''''
 +
| '''''Parameters'''''
 +
| '''''Example '''''
  
 
|-
 
|-
| Right
+
| AND
|  
+
| Logical AND
 
|  
 
|  
  
 
|-
 
|-
| Substitute
+
| FALSE
|  
+
| Logical FALSE
 
|  
 
|  
  
 
|-
 
|-
| Text
+
| IF
|  
+
| Conditional execution
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Description'''''
 +
| A term that is evaluated if the condition evaluates to true.
 +
| A term that is evaluated if the condition evaluates to false.
 +
|}
 
|  
 
|  
  
 
|-
 
|-
| T
+
| AND
|  
+
| Logical AND
 
|  
 
|  
  
 
|-
 
|-
| Trim
+
| OR
|  
+
| Logical OR
 
|  
 
|  
  
 
|-
 
|-
| Upper
+
| TRUE
|  
+
| Logical TRUE
 
|  
 
|  
  
 
|-
 
|-
| URL
+
| XOR
 +
| Logical XOR
 
|  
 
|  
|
 
 
 
|}
 
|}
 
<br>
 
<br>
'''Userdefined''' <br>
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Description'''''
 
| '''''Example'''''
 
 
|-
 
| Mapped
 
|
 
|
 
 
|-
 
| Null
 
|
 
|
 
 
|}
 

Revision as of 09:37, 11 October 2007

The Sun Report Builder supplies the following functions:


Rounding

Function Name Description Parameters Example
INT Returns a number down to the nearest integer


Information

Function Name Description Parameters Example
CHOOSE Uses an index to return a value from a list of values.
HASCHANGED Checks, whether the columns specified by the given names has changed.
ISBLANK Checks, whether the value is undefined (null).
ISERR Tells if the parameter is of error type but returns false if the error is of type NA.
ISERROR Tells if the parameter is of error type but returns false.
ISEVEN Checks whatever the value is an even number.
ISLOGICAL Checks whatever the value is of type Logical.
ISNA Tells if the parameter is of error type NA.
ISNONTEXT Checks whatever the value is not of type Text.
ISNUMBER Checks whatever the value is of type Number.
ISODD Checks whatever the value is an odd number.
ISREF Checks whatever the value is a reference.
ISTEXT Checks whatever the value is of type Text.
NA Returns the constant error NA.


Date/Time

Function Name Description Parameters Example
DATE Returns the number of days since 01.01.1900
Parameter Description Month Day
DATEDIF Returns the number of years, months, or days between two dates.
Parameter Description Date2 Format
DATEVALUE Returns date serial number from given text.
DAY Returns the day of a date
HOUR Returns the hour (0 through 23) from a time.
MONTH Returns the month of a date
NOW Returns the current time
TIME Returns the time
Parameter Description Minute. Second
TODAY Returns the current date
WEEKDAY Returns the day of week from a date.
Parameter Description Type
YEAR Returns the year of a date


Text

Function Name Description Parameters Example
EXACT Reports if two text values are exactly equal using a case-sensitive comparison.
Parameter Description Text2
FIND Returns the starting position of a given text.
Parameter Description Text Index
LEFT Returns a selected number of text characters from the left.
Parameter Description Length
LEN Returns the lengh in characters of the given value.
LOWER Returns the given text in lower case.
MID Returns extracted text, given an original text, starting position, and length.
Parameter Description Start Length
REPLACE Returns text where an old text is substituted with a new text within the start index and length range.
Parameter Description Start Len New
REPT Returns text repeated Count times..
Parameter Description Count
RIGHT Returns a selected number of text characters from the right.
Parameter Description Count
SUBSTITUTE Returns text where an old text is substituted with a new text. If which is specified, only this occurrance will be replaced otherwise every occurrance will be replaced.
Parameter Description Old New Which
T Returns the given text value or a zero lenght string for non text type.
TEXT Returns the given value as text.
LOWER Returns the given text free of leading and trailing spaces. Internal multiple spaces are replaced by one.
UPPER Returns the given text in upper case.
URLENCODE Applies URL-Encoding to a text given in the first parameter using the encoding specified in the second parameter. If no encoding is given, ISO-8859-1 is assumed.
Parameter Description Encoding


Mathematical

Function Name Description Parameters Example
ABS Returns the absolute (nonnegative) of the value.
AVERAGE Average a list of numeric values.
Even Returns the rounding a number up to the nearest even integer.
MAX Returns the maximum from a set of numbers.
MIN Returns the minimum from a set of numbers.
MOD Returns the remainder when one number is divided by another number.
Parameter Description Divisor
ODD Returns the rounding a number up to the nearest odd integer.
SUM Sum a list of numeric values.


Logical

Function Name Description Parameters Example
AND Logical AND
FALSE Logical FALSE
IF Conditional execution
Parameter Description A term that is evaluated if the condition evaluates to true. A term that is evaluated if the condition evaluates to false.
AND Logical AND
OR Logical OR
TRUE Logical TRUE
XOR Logical XOR


Personal tools