Customizing a Row Title

How to:

You can customize a row title in an FML report for accurate data identification. Using the AS phrase, you can provide new titles for TAG, DATA, RECAP, and PICKUP rows.


Top of page

x
Syntax: How to Customize a Row Title in FML

For a TAG row, use the syntax:

value AS {'title'|CAPTION}

For a DATA or PICKUP row, use the syntax:

value AS 'title'

For a RECAP row, use the syntax:

RECAP calcname[/format]=expression; AS 'title'

where:

value

Is the value on which you are reporting, whether retrieved from a data source or external file (represented by a tag), supplied directly by a user in the request, or picked up from a work file.

title

Is the customized row title, enclosed in single quotation marks if it contains embedded blanks.

In a TAG, DATA, or PICKUP row, the default row title is value.

In a RECAP row, the default title is calcname.

CAPTION

In the Master File of a hierarchical data source, CAPTION identifies a TAG row using a caption field. Note that the hierarchy in the Master File defines the PARENT-OF the FOR field.

calcname

Is the value that is derived by the RECAP calculation.



Example: Changing the Titles of Tag Rows

In the following example, the row titles CASH ON HAND and DEMAND DEPOSITS provide meaningful identifications for the corresponding tags.

TABLE FILE LEDGER
SUM AMOUNT FOR ACCOUNT 
1010 AS 'CASH ON HAND' OVER
1020 AS 'DEMAND DEPOSITS' 
END

Note that single quotation marks are necessary since the row title being assigned has embedded blanks.

The output is shown as follows.

                 AMOUNT
                 ------
CASH ON HAND      8,784
DEMAND DEPOSITS   4,494

If no AS phrase is included, the tag values are displayed in the report.



Example: Customizing a Row Title for a RECAP Value

This request creates the title TOTAL CASH for the RECAP value TOTCASH.

TABLE FILE LEDGER
SUM AMOUNT FOR ACCOUNT
1010 AS 'CASH ON HAND'      OVER
1020 AS 'DEMAND DEPOSITS'   OVER
1030 AS 'TIME DEPOSITS'     OVER 
RECAP TOTCASH = R1 + R2 + R3; AS 'TOTAL CASH' 
END

The output is shown as follows.

                 AMOUNT
                 ------
CASH ON HAND      8,784
DEMAND DEPOSITS   4,494
TIME DEPOSITS     7,961
TOTAL CASH       21,239

If no AS phrases are included, the name of the RECAP value (TOTCASH) displays in the report.


WebFOCUS