TEXT

Inserts text or other information on a new line in the report. You specify the character position (charPosition) to begin the text along with the text (text) that you want to display. The command can accept multiple sets of charPosition and text arguments.

In addition to text, you can use this command to insert special information based on keywords into the report. These keywords begin with a "*" and must be entered exactly. For example, you can display the current date and time, the page number, or information such as user name and application.

The following list presents the keywords and associated display information.

  • APPNAME: Name of application

  • ARBOR: Version information

  • CALC: All or part of a calculated row Optionally, the CALC keyword can include an integer to designate a data column that is to be displayed. For example, {TEXT 25 "*CALC 2""TotSales"} would display the column 2 value of the calculated row "TotSales" starting at character position 25, using the current column format settings in effect for column 2.

    Note:

    Names columns are not allowed.

  • COLHDR number1 number2: Displays the column heading members from the current default heading. You can indicate which rows of the column header members you want to display and which members in the row following the keyword.

    number1 selects the row of column members and number2 selects the member within the row. If you specify just *COLHDR or *COLHDR with number1, the column heading members can not be combined with any other text on the same line. Furthermore, the position of the text is ignored (the header line will automatically be lined up with the existing data column setup), unless you specify both number1 and number2. For example, *COLHDR 2 would display the second row of column heading members in normal position over the data columns. *COLHDR 2 5 would display the 5th column member from the second row of column heading members. This command is usually used with SUPHEADING or SUPCOLHEADING.

    Using both number1 and number2,

    TEXT 25 "*COLHDR 2 3"

    would display the third member of the column heading range from the second row of column members starting in position 25.

    Generally all column heading rows after the first level in symmetric reports have repeating groups of the same range of members.

    The number2 specified refers to the member in the basic group of repeating members. For example, if Qtr1 Qtr2 and Qtr3 are the basic group which repeats in the second level column heading, the value for number2 can range from 1 to 3. Just because the group repeats 2 or 3 times does not mean that number2 can range up to 6 or 9. In this example, any number2 higher than 3 would be interpreted as trying to access a calculated column header.

    Calculated column headers may also be accessed by the *COLHDR option. If a report has, for example, 3 calculated columns, the number2 which is used to access any particular level of the calculated column name depends on the number of members in the primary column header group for that heading level. In the previous example, where the second column heading line contained three members (Qtr1, Qtr2, and Qtr3), the second-level calculated column headings would be accessed with number2 set to 4, 5, or 6 (assuming only one row names column). Again, it does not matter how many times Qtr1, Qtr2, and Qtr3 may have been repeated on the column heading line-there are still only three members of the primary column header group.

    For example, if the first calculated column defined is "YTD~PCT~TOTAL", then the second level header "PCT" could be printed with TEXT 10 "*COLHDR 2 4", assuming once again that the primary column heading group on level 2 had three members and only one row name dimension. Refer to ORDER for more information about column numbering.

    The ORDER command does not affect the parameters for selecting the headers. The number2 value is based on the original column order without regard to any reordering or truncation of columns with ORDER or FIXCOLUMNS.

  • COLHDRFULL, which is the full column heading along with underlines of the column headings and a 1 line skip. The position is ignored with this keyword (the headers and underlines will be aligned automatically over the data columns as currently set up)and it can not be combined with any other text on the same line.

  • CURRENCY, which is the currency conversion label which indicates which currency the data values have been converted to at report time with the CURRENCY command. Usually used with SUPCURHEADING.

  • DATA, which is used to display data rows. If the command does not include a column designator, it will display all data starting at the character position. If a column number is included, only that column will be displayed. See *CALC above.

  • DATE, which is the date the report was generated.

  • DATETIME, which is the date followed by the time the report was generated.

  • DBNAME, which is the name of the data base within the application.

  • EDATE, which is the date in European (dd/mm/yy) format.

  • EDATETIME, which is the date in European (dd/mm/yy) format followed by the time. Time is in 24-hour format, as hour:minute:second; for example, 14:35:02.

  • MACHINE, which is the network name for the machine that is running the Essbase Server.

  • PAGEHDR number: Displays the default page member heading. number indicates which specific page members you wish to display following the keyword. The page member text can only be combined with other text on the same line if number is specified. For example, TEXT C *PAGEHDR 2 would display only the second page member from the page heading members from the current default page heading. Usually used with SUPHEADING or SUPPAGEHEADING.

  • PAGENO: Page number for the current page.

  • PAGESTRING: Page number preceded by the text "Page:".

  • TIME: Time the report was generated.

  • TIMEDATE: Time followed by the date the report was generated.

  • TIMEEDATE: Time followed by the European format (dd/mm/yy) date.

  • USERNAME: Name of the user generating the report.

Syntax

{TEXT charPosition "text " [ charPosition "text" ... ]}

Parameters

charPosition

Character position on the line to start the text specified in the next text argument. When multiple sets of charPositions and text can be specified, successive charPositions need not be in ascending order. If the positions of two text strings cause an overlap, the last overwrites the first. "Last" is determined by left-right order in the TEXT statement, not by charPosition.

text

Text to add to the report. Commas, tabs and multiple spaces are ignored. Maximum length: 500 characters.

Notes

  • TEXT is an output command.

  • n must be an integer greater than or equal to zero or the letter c for centered. (If you specify n as zero, the line starts at the left margin.) You must specify a value for n.

  • TEXT does not wrap the text specified in "text".

  • You can use the * (asterisk) character to add report keywords, such as *CALC and *TIME. If * precedes an invalid keyword, Essbase displays the text that follows.

Example

  • Adding the text "Golden State Bottling Division" 27 spaces from the left margin of the report. This example is based on Demo Basic.

    {TEXT 27 "Golden State Bottling Division" }
  • The following report lists several Examples of the TEXT command.

    The first set of TEXT commands is defined in the custom heading of the report which is displayed at the top of every page.

    • The command { TEXT 2 "*DATETIME" C "Annual Report" 65 "*PAGESTRING" SKIP } displays the date and time starting at character position 2 of the first line of the heading, centers the text "Annual Report" in the middle of the line, and displays the text "Page" followed by the actual page number starting at character position 65 of the first line.

    • The second line of the heading is defined by the command { TEXT 2 "City: " 12 "*PAGEHDR 1" } which displays the text "City:" starting a character position 2 and then displays the first page member for the page in the report. As per the first member in the PAGE command, these members are always from the Market dimension.

    • The command { TEXT 2 "Account: " 12 "*PAGEHDR 2" SKIP } for the third line of heading displays the text "City" at character position 2 followed by the page heading member from the Accounts dimension.

    The TEXT commands at the end of the report display summary information about the report.

    • The command { TEXT 2 "Prepared by: " 18 "*USERNAME" } displays the text "Prepared by:" at character position 2 followed by the name of the user who generated the report at character position 18.

    • For the next line, the command { TEXT 2 "Server Version: " 18 "*ARBOR" } displays the text "Server Version:" at character position 2 followed by the version information.

    • The third line uses the command { TEXT 2 "Application: " 18 "*APPNAME" } to display the text "Application:" at character position 2 followed by the application name.

    • The final line uses the command { TEXT 2 "Database: " 18 "*DBNAME" } to display the text "Database:" at character position 2 followed by the database name.

{ STARTHEADING
  SUPPAGEHEADING
  TEXT 2 "*DATETIME" C "Annual Report" 65 "*PAGESTRING" SKIP
  TEXT 2 "City: " 12 "*PAGEHDR 1"
  TEXT 2 "Account: " 12 "*PAGEHDR 2" SKIP
  ENDHEADING }

<PAGE (Market, Accounts)
Chicago Sales

            <COLUMN (Scenario, Year)

            Actual
            <CHILDREN Year

<ROW Audio

{ SKIP 2 "Prepared by: " 18 "*USERNAME" }
{ TEXT 2 "Server Version: " 18 "*ARBOR" }
{ TEXT 2 "Application: " 18 "*APPNAME" }
{ TEXT 2 "Database: " 18 "*DBNAME" }
     !
09/15/03 14:14:59          Annual Report                       Page: 1

  City:     Chicago
  Account:  Sales

                     Qtr1     Qtr2     Qtr3     Qtr4 
                 ======== ======== ======== ======== 

Stereo              2,591    2,476    2,567    3,035 
Compact_Disc        3,150    3,021    3,032    3,974 
  Audio             5,741    5,497    5,599    7,009 

  Prepared by :   Admin
  Server Version: Gemini Alpha - 9/6/95 [Fri Sep 15 14:14:59 1995]
  Application:    Demo
  Database:       Basic

The remaining examples of the TEXT command are based on the following report heading:

                              Chicago Sales

              Actual               Budget
   Qtr1    Qtr2    Qtr3    Qtr1     Qtr2     Qtr3
======= ======= ======= ======= ======== ======== 
  • { TEXT 10 "*COLHDR 2" }

    would produce the following line:

    Qtr1 Qtr2 Qtr3 Qtr1 Qtr2 Qtr3
  • { TEXT 10 "*COLHDR 2 3" }

    would produce the following text at position 10:

                    Qtr3
  • { TEXT 10 &QUOT;*COLHDR 1 2&QUOT; }

    would produce the following text at position 10:

                   Budget
  • { TEXT 10 &QUOT;COLHDRFULL&QUOT; }

    would produce the following lines of text regardless of the value of charPosition:

                 Actual                     Budget
          Qtr1    Qtr2    Qtr3      Qtr1     Qtr2      Qtr3
       =======  =======  =======  =======  ========  ========