The TEXT command adds descriptive text to a report.
{TEXT charPosition "text " [ charPosition "text" ... ]}
charPosition | Character position on the line to start the text specified in the next text argument. When multiple sets of charPositions/i>s 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. |
This command 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 can 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 in the report, the page number of the current page, or even user information such as the user name and application.
The following list presents the keywords along with the associated information that is displayed in the report.
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.
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 even 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.
TEXT C *PAGEHDR 2
would
display only the second page member from the page heading members from the
current default page heading. It is usually used with SUPHEADING or SUPPAGEHEADING.{TEXT 27 "Golden State Bottling Division" }
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 TEXT commands at the end of the report display summary information about the report.
{ 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 |
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 "*COLHDR 1 2" }
would produce the following text at position 10:
Budget
{ TEXT 10 "COLHDRFULL" }
would produce the following lines of text regardless of the value of charposition:
Actual Budget Qtr1 Qtr2 Qtr3 Qtr1 Qtr2 Qtr3 ======= ======= ======= ======= ======== ======== |
©2004 Hyperion Solutions Corporation. All Rights Reserved. http://www.hyperion.com |