Difference between revisions of "SUN Report Builder/Functions"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{Database/Lang|Base/Reports/Functions}}
 
{{Database/Lang|Base/Reports/Functions}}
  
== The Sun Report Builder supplies the following functions: ==
+
'''Date/Time'''<br>
 
 
 
 
=== Rounding ===
 
 
 
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Function Name'''''
Line 12: Line 8:
  
 
|-
 
|-
| INT
+
| DATE
| Returns a number down to the nearest integer
+
| Provides an internal number for the date given.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Name'''''
 +
| '''''Parameter Description'''''
 +
 
 +
|-
 +
| month
 +
| An integer between 1 and 12 representing the month.
 +
|-
 +
| day
 +
| An integer between 1 and 31 representing the day of the month.
 +
|}
 +
 
 
|  
 
|  
 +
 +
|-
 +
| DATEDIF
 +
| Returns the number of years, months, or days between two dates.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Name'''''
 +
| '''''Parameter Description'''''
 +
 +
|-
 +
| EndDate
 +
| Second date.
 +
|-
 +
| Format
 +
| Format code.
 
|}
 
|}
  
=== Information ===
+
|
 +
 
 +
|-
 +
| DATEVALUE
 +
| Returns an internal number for a text having a possible date format.
 +
|
 +
 
 +
|-
 +
| DAY
 +
| Returns the sequential date of the month as an integer (1-31) in relation to the date value.
 +
|
  
 +
|-
 +
| DAYS
 +
| Calculates the number of days between two dates.
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
| '''''Function Name'''''
+
| '''''Parameter Name'''''  
| '''''Description'''''  
+
| '''''Parameter Description'''''  
| '''''Example '''''
+
 
 +
|-
 +
| Date_1
 +
| The start date for calculating the difference in days.
 +
|}
 +
 
 +
|
 +
 
 +
|-
 +
| HOUR
 +
| Determines the sequential number of the hour of the day (0-23) for the time value.
 +
|
 +
 
 +
|-
 +
| MINUTE
 +
| Determines the sequential number for the minute of the hour (0-59) for the time value.
 +
|
 +
 
 +
|-
 +
| MONTH
 +
| Determines the sequential number of a month of the year (1-12) for the date value.
 +
|
 +
 
 +
|-
 +
| NOW
 +
| Determines the current time of the computer.
 +
|  
  
 
|-
 
|-
| CHOOSE
+
| SECOND
| Uses an index to return a value from a list of values.
+
| Determines the sequential number of the second of a minute (0-59) for the time value.
 
|  
 
|  
  
 
|-
 
|-
| HASCHANGED
+
| TIME
| Checks, whether the columns specified by the given names has changed.
+
| Determines a time value from the details for hour, minute and second.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Name'''''
 +
| '''''Parameter Description'''''
 +
 
 +
|-
 +
| minute
 +
| The integer for the minute.
 +
|-
 +
| second
 +
| The integer for the second.
 +
|}
 +
 
 
|  
 
|  
  
 
|-
 
|-
| ISBLANK
+
| TIMEVALUE
| Checks, whether the value is undefined (null).
+
| Returns a sequential number for a text shown in a possible time entry format.
 
|  
 
|  
  
 
|-
 
|-
| ISERR
+
| TODAY
| Tells if the parameter is of error type but returns false if the error is of type NA.
+
| Determines the current date of the computer.
 
|  
 
|  
  
 
|-
 
|-
| ISERROR
+
| WEEKDAY
| Tells if the parameter is of error type but returns false.
+
| Returns the day of the week for the date value as an integer (1-7).
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Name'''''
 +
| '''''Parameter Description'''''
 +
 
 +
|-
 +
| Type
 +
| Fixes the beginning of the week and the type of calculation to be used.(1 = Sunday is the first day of the week, with value 1; Saturday has value 7, 2 = Monday is the first day of the week, with value 1; Sunday has value 7, 3 = Monday is the first day of the week, with value 0; Sunday has value 6)
 +
|}
 +
 
 
|  
 
|  
  
 
|-
 
|-
| ISEVEN
+
| YEAR
| Checks whatever the value is an even number.
+
| Returns the year of a date value as an integer.
 
|  
 
|  
 +
|}
 +
<br>
 +
'''Mathematical'''<br>
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Function Name'''''
 +
| '''''Description'''''
 +
| '''''Example '''''
  
 
|-
 
|-
| ISLOGICAL
+
| ABS
| Checks whatever the value is of type Logical.
+
| Absolute value of a number.
 
|  
 
|  
  
 
|-
 
|-
| ISNA
+
| AVERAGE
| Tells if the parameter is of error type NA.
+
| Returns the average of a sample.
 
|  
 
|  
  
 
|-
 
|-
| ISNONTEXT
+
| AVERAGE
| Checks whatever the value is not of type Text.
+
| Returns the average of a sample.
 
|  
 
|  
  
 
|-
 
|-
| ISNUMBER
+
| EVEN
| Checks whatever the value is of type Number.
+
| Rounds a positive number up and negative number down to the nearest even integer.
 
|  
 
|  
  
 
|-
 
|-
| ISODD
+
| MAX
| Checks whatever the value is an odd number.
+
| Returns the maximum value in a list of arguments.
 
|  
 
|  
  
 
|-
 
|-
| ISREF
+
| MAXA
| Checks whatever the value is a reference.
+
| Returns the maximum value in a list of arguments. Text is evaluated as zero.
 
|  
 
|  
  
 
|-
 
|-
| ISTEXT
+
| MIN
| Checks whatever the value is of type Text.
+
| Returns the minimum value in a list of arguments.
 
|  
 
|  
  
 
|-
 
|-
| NA
+
| MINA
| Returns the constant error NA.
+
| Returns the smallest value in a list of arguments. Text is evaluated as zero.
 
|  
 
|  
 +
 +
|-
 +
| MOD
 +
| Calculates the remainder of a division.
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Parameter Name'''''
 +
| '''''Parameter Description'''''
 +
 +
|-
 +
| Divisor
 +
| The number by which the dividend is divided.
 
|}
 
|}
  
=== Date/Time ===
+
|
 +
 
 +
|-
 +
| ODD
 +
| Rounds a positive number up and negative number down to the nearest odd integer.
 +
|
  
 +
|-
 +
| SUM
 +
| Returns the sum of all arguments.
 +
|
 +
|}
 +
<br>
 +
'''Logical'''<br>
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Function Name'''''
Line 103: Line 215:
  
 
|-
 
|-
| DATE
+
| AND
| Returns the number of days since 01.01.1900
+
| Returns TRUE if all arguments are TRUE.
 +
|
 +
 
 +
|-
 +
| FALSE
 +
| Defines the logical value as FALSE.
 +
|
 +
 
 +
|-
 +
| IF
 +
| Specifies a logical test to be performed.
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 110: Line 232:
  
 
|-
 
|-
| Month
+
| Then_value
| Month
+
| The result of the function if the logical test returns a TRUE.
 
|-
 
|-
| Day
+
| Otherwise_value
| Day
+
| The result of the function if the logical test returns FALSE.
 
|}
 
|}
  
Line 120: Line 242:
  
 
|-
 
|-
| DATEDIF
+
| NOT
| Returns the number of years, months, or days between two dates.
+
| Reverses the value of the argument.
 +
|
 +
 
 +
|-
 +
| OR
 +
| Returns TRUE if an argument is TRUE.
 +
|
 +
 
 +
|-
 +
| TRUE
 +
| Returns the logical value TRUE.
 +
|
 +
 
 +
|-
 +
| XOR
 +
| Returns TRUE if a odd number of arguments are TRUE.
 +
|
 +
|}
 +
<br>
 +
'''Information'''<br>
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Function Name'''''
 +
| '''''Description'''''
 +
| '''''Example '''''
 +
 
 +
|-
 +
| CHOOSE
 +
| Selects a value from a list of up to 30 value arguments.
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 127: Line 276:
  
 
|-
 
|-
| Date1
+
| value
| First date.
+
| Value 1, value 2,... The list of arguments from which a value is chosen.
 +
|}
 +
 
 +
|
 +
 
 
|-
 
|-
| Date2
+
| COUNT
| Second date.
+
| Counts how many numbers are in the list of arguments.
 +
|
 +
 
 
|-
 
|-
| Format
+
| COUNTA
| Format code.
+
| Counts how many values are in the list of arguments.
|}
+
|  
  
 +
|-
 +
| COUNTBLANK
 +
| Counts the blank cells in a specified range.
 
|  
 
|  
  
 
|-
 
|-
| DATEVALUE
+
| HASCHANGED
| Returns date serial number from given text.
+
| Checks whether the columns specified by the given names has changed.
 
|  
 
|  
  
 
|-
 
|-
| DAY
+
| ISBLANK
| Returns the day of a date
+
| Returns TRUE if value refers to an empty cell.
 
|  
 
|  
  
 
|-
 
|-
| HOUR
+
| ISERR
| Returns the hour (0 through 23) from a time.
+
| Returns TRUE if the value is an error value not equal to #N/A.
 
|  
 
|  
  
 
|-
 
|-
| MONTH
+
| ISERROR
| Returns the month of a date
+
| Returns TRUE if the value is an error value.
 
|  
 
|  
  
 
|-
 
|-
| NOW
+
| ISEVEN
| Returns the current time
+
| Returns TRUE if value is an even integer.
 
|  
 
|  
  
 
|-
 
|-
| TIME
+
| ISLOGICAL
| Returns the time
+
| Returns TRUE if the value carries a logical number format.
{| class="prettytable" cellpadding="10" border="1"
+
|  
| '''''Parameter Name'''''
 
| '''''Parameter Description'''''
 
  
 
|-
 
|-
| Minute.
+
| ISNA
| Minutes
+
| Returns TRUE if value equals #N/A.
 +
|  
 +
 
 
|-
 
|-
| Second
+
| ISNONTEXT
| Seconds
+
| Returns TRUE if the value is not text.
|}
+
|  
  
 +
|-
 +
| ISNUMBER
 +
| Returns TRUE if value is a number.
 
|  
 
|  
  
 
|-
 
|-
| TODAY
+
| ISODD
| Returns the current date
+
| Returns TRUE if value is an odd integer.
| "Insert -> Date and Time"
+
|  
  
 
|-
 
|-
| WEEKDAY
+
| ISREF
| Returns the day of week from a date.
+
| Returns TRUE if value is a reference.
{| class="prettytable" cellpadding="10" border="1"
+
|  
| '''''Parameter Name'''''
 
| '''''Parameter Description'''''
 
  
 
|-
 
|-
| Type
+
| ISTEXT
| The result type (from 1 to 3)
+
| Returns TRUE if value is text.
|}
+
|  
  
 +
|-
 +
| NA
 +
| Not available. Returns the error value #N/A.
 
|  
 
|  
 +
|}
 +
<br>
 +
'''User-Defined'''<br>
 +
{| class="prettytable" cellpadding="10" border="1"
 +
| '''''Function Name'''''
 +
| '''''Description'''''
 +
| '''''Example '''''
  
 
|-
 
|-
| YEAR
+
| NULL
| Returns the year of a date
+
| Returns a NULL-Value
 
|  
 
|  
 
|}
 
|}
 
+
<br>
=== Text ===
+
'''Text'''<br>
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Function Name'''''
Line 214: Line 383:
 
|-
 
|-
 
| EXACT
 
| EXACT
| Reports if two text values are exactly equal using a case-sensitive comparison.
+
| Specifies whether two texts are identical.
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 220: Line 389:
  
 
|-
 
|-
| Text2
+
| text_2
| The second text.
+
| The second text for comparing texts.
 
|}
 
|}
  
Line 228: Line 397:
 
|-
 
|-
 
| FIND
 
| FIND
| Returns the starting position of a given text.
+
| Looks for a string of text within another (case sensitive)
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 234: Line 403:
  
 
|-
 
|-
| Text
+
| text
| The text source.
+
| The text in which a search is to be made.
 
|-
 
|-
| Index
+
| position
| The index to start from.
+
| The position in the text from which the search starts.
 
|}
 
|}
  
Line 245: Line 414:
 
|-
 
|-
 
| LEFT
 
| LEFT
| Returns a selected number of text characters from the left.
+
| Returns the first character or characters of a text.
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 251: Line 420:
  
 
|-
 
|-
| Length
+
| number
| The length.
+
| The number of characters for the start text.
 
|}
 
|}
  
Line 259: Line 428:
 
|-
 
|-
 
| LEN
 
| LEN
| Returns the lengh in characters of the given value.
+
| Calculates length of a text string.
 
|  
 
|  
  
 
|-
 
|-
 
| LOWER
 
| LOWER
| Returns the given text in lower case.
+
| Converts text to lowercase.
 
|  
 
|  
  
 
|-
 
|-
 
| MID
 
| MID
| Returns extracted text, given an original text, starting position, and length.
+
| Returns a partial text string of a text.
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 275: Line 444:
  
 
|-
 
|-
| Start
+
| start
| The start index.
+
| The position from which the part word is to be determined.
 
|-
 
|-
| Length
+
| number
| The length.
+
| The number of characters for the text.
 
|}
 
|}
  
Line 286: Line 455:
 
|-
 
|-
 
| REPLACE
 
| REPLACE
| Returns text where an old text is substituted with a new text within the start index and length range.
+
| Replaces characters within a text string with a different text string.
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 292: Line 461:
  
 
|-
 
|-
| Start
+
| position
| The start index.
+
| The character position from which text is to be replaced.
 
|-
 
|-
| Len
+
| length
| The length.
+
| The number of characters to be replaced.
 
|-
 
|-
| New
+
| new text
| The new text.
+
| The text to be inserted.
 
|}
 
|}
  
Line 306: Line 475:
 
|-
 
|-
 
| REPT
 
| REPT
| Returns text repeated Count times..
+
| Repeats text a given number of times.
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 312: Line 481:
  
 
|-
 
|-
| Count
+
| number
| The count.
+
| The number of times the text is to be repeated.
 
|}
 
|}
  
Line 320: Line 489:
 
|-
 
|-
 
| RIGHT
 
| RIGHT
| Returns a selected number of text characters from the right.
+
| Returns the last character or characters of a text.
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 326: Line 495:
  
 
|-
 
|-
| Count
+
| number
| The count.
+
| The number of characters for the end text.
 
|}
 
|}
  
Line 334: Line 503:
 
|-
 
|-
 
| SUBSTITUTE
 
| 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.
+
| Substitutes new text for old text in a string.
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 340: Line 509:
  
 
|-
 
|-
| Old
+
| search_text
| The old text.
+
| The partial string to be (repeatedly) replaced.
 
|-
 
|-
| New
+
| new text
| The new text.
+
| The text which is to replace the text string.
 
|-
 
|-
| Which
+
| occurrence
| The occurrance number.
+
| Which occurence of the old text is to be replaced.
 
|}
 
|}
  
Line 354: Line 523:
 
|-
 
|-
 
| T
 
| T
| Returns the given text value or a zero lenght string for non text type.
+
| Converts a value into text.
 
|  
 
|  
  
 
|-
 
|-
 
| TEXT
 
| TEXT
| Returns the given value as text.
+
| Converts a number to text according to a given format.
 
|  
 
|  
  
 
|-
 
|-
| LOWER
+
| TRIM
| Returns the given text free of leading and trailing spaces. Internal multiple spaces are replaced by one.
+
| Removes extra spaces from text.
 
|  
 
|  
  
 
|-
 
|-
| UPPER
+
| UNICHAR
| Returns the given text in upper case.
+
| Converts a code number into a Unicode character or letter.
 
|  
 
|  
  
 
|-
 
|-
| URLENCODE
+
| UNICODE
| 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.
+
| Returns the numeric code for the first Unicode character in a text string.
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''
 
| '''''Parameter Description'''''
 
 
 
|-
 
| Encoding
 
| The Encoding to be used.
 
|}
 
 
 
 
|  
 
|  
|}
 
 
=== Mathematical ===
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Description'''''
 
| '''''Example '''''
 
  
 
|-
 
|-
| ABS
+
| UPPER
| Returns the absolute (nonnegative) of the value.
+
| Converts text to uppercase.
 
|  
 
|  
  
 
|-
 
|-
| AVERAGE
+
| URLENCODE
| Average a list of numeric values.
+
| 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.
|
 
 
 
|-
 
| 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.
 
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''  
 
| '''''Parameter Name'''''  
Line 426: Line 559:
  
 
|-
 
|-
| Divisor
+
| Encoding
| A divisor value.
+
| The Encoding to be used.
|-
 
|-
 
|-
 
|-
 
|-
 
|-
 
|-
 
|-
 
|-
 
|-
 
 
|}
 
|}
  
|
 
 
|-
 
| ODD
 
| Returns the rounding a number up to the nearest odd integer.
 
|
 
 
|-
 
| SUM
 
| Sum a list of numeric values.
 
 
|  
 
|  
 
|}
 
|}
 
+
<br>
=== Logical ===
+
'''Rounding'''<br>
 
{| class="prettytable" cellpadding="10" border="1"
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Function Name'''''
 
| '''''Function Name'''''
Line 460: Line 573:
  
 
|-
 
|-
| AND
+
| INT
| Logical AND
+
| Rounds a number down to the nearest integer.
|
 
 
 
|-
 
| FALSE
 
| Logical FALSE
 
|
 
 
 
|-
 
| IF
 
| Conditional execution
 
{| class="prettytable" cellpadding="10" border="1"
 
| '''''Parameter Name'''''
 
| '''''Parameter Description'''''
 
 
 
|-
 
| A term that is evaluated if the condition evaluates to true.
 
| True-Term
 
|-
 
| A term that is evaluated if the condition evaluates to false.
 
| False-Term
 
|}
 
 
 
|
 
 
 
|-
 
| AND
 
| Logical AND
 
|
 
 
 
|-
 
| OR
 
| Logical OR
 
|
 
 
 
|-
 
| TRUE
 
| Logical TRUE
 
|
 
 
 
|-
 
| XOR
 
| Logical XOR
 
 
|  
 
|  
 
|}
 
|}
 
<br>
 
<br>
''Code to get the function form the libformula jar file
 
<source lang="java">
 
import java.util.Locale;
 
import org.jfree.formula.DefaultFormulaContext;
 
 
/*
 
* To change this template, choose Tools | Templates
 
* and open the template in the editor.
 
*/
 
import org.jfree.formula.function.FunctionCategory;
 
import org.jfree.formula.function.FunctionDescription;
 
import org.jfree.formula.function.FunctionRegistry;
 
 
/**
 
*
 
* @author Ocke Janssen
 
*/
 
public class NewMain {
 
 
    /**
 
    * @param args the command line arguments
 
    */
 
    public static void main(String[] args) {
 
        DefaultFormulaContext obj = new DefaultFormulaContext();
 
        FunctionRegistry func = obj.getFunctionRegistry();
 
        FunctionCategory[] categories = func.getCategories();
 
        for ( int i = 0 ; i < categories.length;++i)
 
        {
 
            String display = categories[i].getDisplayName(Locale.ENGLISH);
 
            System.out.println( "'''" + display +"'''<br>");
 
            System.out.println( "{| class=\"prettytable\" cellpadding=\"10\" border=\"1\"");
 
            System.out.println( "| '''''Function Name'''''");
 
            System.out.println( "| '''''Description''''' ");
 
            System.out.println( "| '''''Example '''''");
 
           
 
            String[] functions = func.getFunctionNamesByCategory(categories[i]);
 
            for(int j= 0; j < functions.length;++j)
 
            {
 
                FunctionDescription desc = func.getMetaData(functions[j]);
 
                System.out.println( "");
 
                System.out.println( "|-");
 
                System.out.println("| "+ desc.getDisplayName(Locale.ENGLISH));
 
                System.out.println("| "+ desc.getDescription(Locale.ENGLISH));
 
                int count = desc.getParameterCount();
 
                if ( count > 1 ){
 
                    System.out.println( "{| class=\"prettytable\" cellpadding=\"10\" border=\"1\"");
 
                    System.out.println( "| '''''Parameter Name''''' ");
 
                    System.out.println( "| '''''Parameter Description''''' ");
 
                    System.out.println( "");
 
                }
 
                for(int k= 1;k < count;++k){
 
                    try{
 
                        System.out.println( "|-");
 
                        System.out.println("| " + desc.getParameterDisplayName(k,Locale.ENGLISH) );
 
                        System.out.println("| " + desc.getParameterDescription(k,Locale.ENGLISH) );
 
                    } catch(Exception e){
 
                    }
 
                }
 
                if ( count > 1 ){
 
                    System.out.println("|}");
 
                    System.out.println("");
 
                }                   
 
               
 
                System.out.println("| ");
 
            }
 
            System.out.println("|}");
 
            System.out.println("<br>");
 
        }
 
    }
 
 
}
 
</source>
 
 
 
[[Category: Sun Report Builder]]
 
[[Category: Base Documentation]]
 

Revision as of 13:48, 15 December 2008

There are documents also in DE - FR - ES -PT


Date/Time

Function Name Description Example
DATE Provides an internal number for the date given.
Parameter Name Parameter Description
month An integer between 1 and 12 representing the month.
day An integer between 1 and 31 representing the day of the month.
DATEDIF Returns the number of years, months, or days between two dates.
Parameter Name Parameter Description
EndDate Second date.
Format Format code.
DATEVALUE Returns an internal number for a text having a possible date format.
DAY Returns the sequential date of the month as an integer (1-31) in relation to the date value.
DAYS Calculates the number of days between two dates.
Parameter Name Parameter Description
Date_1 The start date for calculating the difference in days.
HOUR Determines the sequential number of the hour of the day (0-23) for the time value.
MINUTE Determines the sequential number for the minute of the hour (0-59) for the time value.
MONTH Determines the sequential number of a month of the year (1-12) for the date value.
NOW Determines the current time of the computer.
SECOND Determines the sequential number of the second of a minute (0-59) for the time value.
TIME Determines a time value from the details for hour, minute and second.
Parameter Name Parameter Description
minute The integer for the minute.
second The integer for the second.
TIMEVALUE Returns a sequential number for a text shown in a possible time entry format.
TODAY Determines the current date of the computer.
WEEKDAY Returns the day of the week for the date value as an integer (1-7).
Parameter Name Parameter Description
Type Fixes the beginning of the week and the type of calculation to be used.(1 = Sunday is the first day of the week, with value 1; Saturday has value 7, 2 = Monday is the first day of the week, with value 1; Sunday has value 7, 3 = Monday is the first day of the week, with value 0; Sunday has value 6)
YEAR Returns the year of a date value as an integer.


Mathematical

Function Name Description Example
ABS Absolute value of a number.
AVERAGE Returns the average of a sample.
AVERAGE Returns the average of a sample.
EVEN Rounds a positive number up and negative number down to the nearest even integer.
MAX Returns the maximum value in a list of arguments.
MAXA Returns the maximum value in a list of arguments. Text is evaluated as zero.
MIN Returns the minimum value in a list of arguments.
MINA Returns the smallest value in a list of arguments. Text is evaluated as zero.
MOD Calculates the remainder of a division.
Parameter Name Parameter Description
Divisor The number by which the dividend is divided.
ODD Rounds a positive number up and negative number down to the nearest odd integer.
SUM Returns the sum of all arguments.


Logical

Function Name Description Example
AND Returns TRUE if all arguments are TRUE.
FALSE Defines the logical value as FALSE.
IF Specifies a logical test to be performed.
Parameter Name Parameter Description
Then_value The result of the function if the logical test returns a TRUE.
Otherwise_value The result of the function if the logical test returns FALSE.
NOT Reverses the value of the argument.
OR Returns TRUE if an argument is TRUE.
TRUE Returns the logical value TRUE.
XOR Returns TRUE if a odd number of arguments are TRUE.


Information

Function Name Description Example
CHOOSE Selects a value from a list of up to 30 value arguments.
Parameter Name Parameter Description
value Value 1, value 2,... The list of arguments from which a value is chosen.
COUNT Counts how many numbers are in the list of arguments.
COUNTA Counts how many values are in the list of arguments.
COUNTBLANK Counts the blank cells in a specified range.
HASCHANGED Checks whether the columns specified by the given names has changed.
ISBLANK Returns TRUE if value refers to an empty cell.
ISERR Returns TRUE if the value is an error value not equal to #N/A.
ISERROR Returns TRUE if the value is an error value.
ISEVEN Returns TRUE if value is an even integer.
ISLOGICAL Returns TRUE if the value carries a logical number format.
ISNA Returns TRUE if value equals #N/A.
ISNONTEXT Returns TRUE if the value is not text.
ISNUMBER Returns TRUE if value is a number.
ISODD Returns TRUE if value is an odd integer.
ISREF Returns TRUE if value is a reference.
ISTEXT Returns TRUE if value is text.
NA Not available. Returns the error value #N/A.


User-Defined

Function Name Description Example
NULL Returns a NULL-Value


Text

Function Name Description Example
EXACT Specifies whether two texts are identical.
Parameter Name Parameter Description
text_2 The second text for comparing texts.
FIND Looks for a string of text within another (case sensitive)
Parameter Name Parameter Description
text The text in which a search is to be made.
position The position in the text from which the search starts.
LEFT Returns the first character or characters of a text.
Parameter Name Parameter Description
number The number of characters for the start text.
LEN Calculates length of a text string.
LOWER Converts text to lowercase.
MID Returns a partial text string of a text.
Parameter Name Parameter Description
start The position from which the part word is to be determined.
number The number of characters for the text.
REPLACE Replaces characters within a text string with a different text string.
Parameter Name Parameter Description
position The character position from which text is to be replaced.
length The number of characters to be replaced.
new text The text to be inserted.
REPT Repeats text a given number of times.
Parameter Name Parameter Description
number The number of times the text is to be repeated.
RIGHT Returns the last character or characters of a text.
Parameter Name Parameter Description
number The number of characters for the end text.
SUBSTITUTE Substitutes new text for old text in a string.
Parameter Name Parameter Description
search_text The partial string to be (repeatedly) replaced.
new text The text which is to replace the text string.
occurrence Which occurence of the old text is to be replaced.
T Converts a value into text.
TEXT Converts a number to text according to a given format.
TRIM Removes extra spaces from text.
UNICHAR Converts a code number into a Unicode character or letter.
UNICODE Returns the numeric code for the first Unicode character in a text string.
UPPER Converts text to uppercase.
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 Name Parameter Description
Encoding The Encoding to be used.


Rounding

Function Name Description Example
INT Rounds a number down to the nearest integer.


Personal tools