In this section: |
How to: |
Improve the readability and presentation of your FML report by:
Note: For an HTML, PDF, or PostScript report, you can use the BLANKINDENT setting to specify an indentation between levels of an FML hierarchy. See Indenting Row Titles in an FML Hierarchy.
Note: You can also format an FML report using StyleSheet attributes if you are creating an output format that supports StyleSheets.
BAR [AS 'character'] OVER
where:
This example uses the default underscore character (_).
TABLE FILE LEDGER SUM AMOUNT FOR ACCOUNT 1010 AS 'CASH ON HAND' OVER 1020 AS 'DEMAND DEPOSITS' OVER 1030 AS 'TIME DEPOSITS' OVER BAR OVER RECAP TOTCASH = R1 + R2 + R3; END
The output is shown as follows.
AMOUNT ------ CASH ON HAND 8,784 DEMAND DEPOSITS 4,494 TIME DEPOSITS 7,961 ------ TOTCASH 21,239
Notice that the BAR ... OVER phrase underlines only the column containing the display field.
Include the following syntax in the FML request in place of a tag value.
PAGE-BREAK OVER
In this example, a page break is inserted after the first two RECAP commands to highlight each calculation.
TABLE FILE LEDGER SUM AMOUNT FOR ACCOUNT 1010 AS 'CASH ON HAND' OVER 1020 AS 'DEMAND DEPOSITS' OVER 1030 AS 'TIME DEPOSITS' OVER BAR OVER RECAP TOTCASH = R1 + R2 + R3; AS 'TOTAL CASH' OVER PAGE-BREAK OVER 1100 AS 'ACCOUNTS RECEIVABLE' LABEL RECEIVE OVER 1200 AS 'INVENTORY' LABEL INVENT OVER BAR OVER RECAP TOTASSET = RECEIVE + INVENT; AS 'TOTAL ASSETS' OVER PAGE-BREAK OVER RECAP TOTAL = TOTCASH + TOTASSET; END
The output is shown as follows.
PAGE 1 AMOUNT ------ CASH ON HAND 8,784 DEMAND DEPOSITS 4,494 TIME DEPOSITS 7,961 ------ TOTAL CASH 21,239 PAGE 2 AMOUNT ------ ACCOUNTS RECEIVABLE 18,829 INVENTORY 27,307 ------ TOTAL ASSETS 46,136 PAGE 3 AMOUNT ------ TOTAL 67,375
FOR forfield [IN k] tag [[GET CHILDREN|WITH CHILDREN] n] INDENT m [AS ['text'|CAPTION]] [OVER]
or
RECAP fieldname[/format]=expression; INDENT m [AS 'text']
where:
Is a field in the data source whose values are included in the report.
Is the starting column for the FOR value in an FML report.
Is a value of forfield to be displayed on a row of the FML report.
Is the number of levels of an FML hierarchy to display on the FML report.
Is a positive integer (zero is not supported) specifying the number of spaces to indent the tag value, label, or caption of an FML row or hierarchy. The indentation starts from column one if there is no IN phrase specified in the FOR command. If there is an IN phrase, indentation starts from the column specified in the IN phrase. The maximum indentation is the same as the maximum length of an AS name.
If you indent an FML hierarchy, the parent line of the hierarchy is indented the number of spaces specified as the indent. The hierarchy levels are indented two spaces from each other. If the GET CHILDREN phrase is used, the first line of the hierarchy is indented an additional two spaces because the hierarchy output begins with the first child rather than the parent. For more information about the use of GET CHILDREN, see Displaying an FML Hierarchy.
Is a label to be displayed on a row of the FML report.
Indicates that a caption field has been defined in the Master File.
Indicates that this row is not the last row to be displayed.
Is a name you assign to the value calculated by the RECAP command.
Is the USAGE format for RECAP field. It cannot exceed the column width. The default is the format of the column in which the calculated value is displayed.
Is the expression that describes how to calculate the field value for RECAP.
In the following request, the label of the second row for tag value 3000 is indented five spaces. Because the GET CHILDREN phrase is used, the first line of the FML hierarchy, in the third row for tag value 3000, is indented seven spaces (five + two).
SET FORMULTIPLE=ON TABLE FILE CENTGL PRINT GL_ACCOUNT_PARENT FOR GL_ACCOUNT 3000 AS 'Not Indented' OVER 3000 INDENT 5 AS 'Indented 5' OVER 3000 GET CHILDREN 2 INDENT 5 AS 'Hierarchy Indented 5' END
The output is shown as follows.
Parent ------ Not Indented 3000 Indented 5 3000 Hierarchy Indented 5 3000 Hierarchy Indented 5 3100 Hierarchy Indented 5 3100 Hierarchy Indented 5 3100 Hierarchy Indented 5 3100 Hierarchy Indented 5 3000 Hierarchy Indented 5 3200 Hierarchy Indented 5 3200 Hierarchy Indented 5 3200 Hierarchy Indented 5 3200 Hierarchy Indented 5 3200 Hierarchy Indented 5 3200 Hierarchy Indented 5 3200
Indenting FML RECAP Rows
The following request sums price, cost, and quantity in stock for digital and analog product types. The first RECAP command calculates the total for each column, and indents the label five spaces. The second RECAP command calculates the profit, and indents the label 10 spaces.
SET FORMULTIPLE=ON TABLE FILE CENTINV SUM PRICE COST QTY_IN_STOCK FOR PRODTYPE Digital OVER Analog OVER BAR OVER RECAP TOTAL = R1 + R2; INDENT 5 AS 'Total:' OVER BAR OVER RECAP PROFIT(2) = TOTAL(1) - TOTAL(2); AS 'Profit:' INDENT 10 END
The output is shown as follows.
Our Quantity Price: Cost: In Stock: ------ ----- --------- Digital 4,080.00 3,052.00 119143 Analog 1,883.00 1,371.00 139345 ------------ ------------ ------- Total: 5,963.00 4,423.00 258488 ------------ ------------ ------- Profit: 1,540.00
How to: |
To clarify relationships within an FML hierarchy, the captions (titles) of values are indented at each level. Use the BLANKINDENT parameter in an HTML, PDF, or PostScript report to specify the indentation between each level in the hierarchy. You can use the default indentation for each hierarchy level or choose your own indentation value. To print indented captions in an HTML report, you must set the BLANKINDENT parameter to ON or to a number.
SET BLANKINDENT does not redefine the width of the indented column, if it is not wide enough to accommodate the indented fields. Columns in table-based formats will automatically size themselves as needed, while columns in position-based formats, such as PDF, PostScript, or PPTX, shift out of alignment. You can use StyleSheet syntax to make the column wide enough for the indented values, and move the columns that follow it. Change the width of a column using the StyleSheet SQUEEZE = n attribute to supply the required space.
A related feature enables you to change the number of blank spaces before the parent line of a hierarchy or before any FML tag or RECAP row in any FML request. For more information, see Formatting an FML Report.
SET BLANKINDENT={ON|OFF|n} ON TABLE SET BLANKINDENT {ON|OFF|n}
where:
Indents FML hierarchy captions 0.125 units for each space that normally displays before the caption. For child levels in an FML hierarchy, it indents 0.125 units for each space that normally displays between this line and the line above it.
Turns off indentations for FML hierarchy captions in an HTML report. OFF is the default value. For other formats, uses the default indentation of two spaces.
Is an explicit measurement in the unit of measurement defined by the UNITS parameter. This measurement is multiplied by the number of spaces that normally displays before the caption. For child levels in an FML hierarchy, it indents n units for each space that normally displays between this line and the line above it. The default number of spaces is two. Zero (0) produces the same report output as OFF. Negative values for n are not supported.
The following request creates an HTML report with the default indentation:
SET PAGE-NUM=NOPAGE SET BLANKINDENT=ON SET FORMULTIPLE=ON TABLE FILE CENTGL PRINT GL_ACCOUNT_PARENT FOR GL_ACCOUNT 3000 AS CAPTION OVER 3000 GET CHILDREN 2 AS CAPTION ON TABLE HOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * TYPE = REPORT, GRID = OFF, $ ENDSTYLE END
The output is shown in the following image.
The following request specifies an indentation of .25 for each level of an FML hierarchy. This number is expressed in the default unit of measurement, which is inches:
SET PAGE-NUM=NOPAGE SET BLANKINDENT=.25 SET FORMULTIPLE=ON TABLE FILE CENTGL PRINT GL_ACCOUNT_PARENT FOR GL_ACCOUNT 3000 AS CAPTION OVER 3000 GET CHILDREN 2 AS CAPTION ON TABLE HOLD FORMAT HTML ON TABLE SET STYLE * TYPE = REPORT, GRID = OFF, $ ENDSTYLE END
The output is shown in the following image.
|
Information Builders |