Suppressing the Display of Rows

In this section:

You may sometimes wish to retrieve data in a TAG row solely for use in a calculation, without displaying the row in a report. To suppress the display of a tag row, add the word NOPRINT to the row declaration, as in a TABLE request.

You may also wish to suppress the display of a TAG row if no data is found for the values. For more information, see Suppressing Rows With No Data.

In addition, you can suppress the display of RECAP rows by adding the word NOPRINT to the RECAP command, following the semicolon. This technique is useful to suppress the display of an intermediate RECAP value, which is intended for use as input to other calculations.


Top of page

Example: Suppressing the Display of a TAG Row

This example uses the value of COST in its computation, but does not display COST as a row in the report.

DEFINE FILE REGION
AMOUNT/I5C=E_ACTUAL;
END
 
TABLE FILE REGION
SUM AMOUNT FOR ACCOUNT
3000 AS 'SALES' LABEL SLS           OVER 
3100 AS 'COST' LABEL COST NOPRINT   OVER 
RECAP PROFIT/I5C = SLS - COST;      OVER
" "                                 OVER
RECAP ROS/F6.2 = 100*PROFIT/SLS;
AS 'RETURN ON SALES'
END

The output is shown in the following image.

report


Top of page

x
Suppressing Rows With No Data

The text for a tag row is displayed even if no data is found in the file for the tag values, with a period (.) representing the missing data. You can override this convention by adding the phrase WHEN EXISTS to the definition of a TAG row. This makes displaying a row dependent upon the existence of data for the tag. This feature is useful, for example, when the same model is applied to different divisions in a company.



Example: Suppressing Rows With No Data

In this example, assume that the variable DIVISION contains Division 1, a real estate syndicate, and Division 2, a bank. The following request describes their balance sheets in one FML report. Rows that are irrelevant for each division are not displayed.

TABLE FILE LEDGER
HEADING CENTER
"BALANCE SHEET FOR DIVISION <DIVISION"
" "
SUM AMOUNT
BY DIVISION NOPRINT
ON DIVISION PAGE-BREAK
FOR ACCOUNT 
2000 AS 'LAND' WHEN EXISTS LABEL LD          OVER 
2100 AS 'CAR LOANS' WHEN EXISTS LABEL LOAN   OVER 
   .
   .
   .

WebFOCUS