Reducing a Report's Width: FOLD-LINE and OVER

In this section:

Wide reports are difficult to read, especially on a screen. To reduce a report's width, use FOLD-LINE and OVER.

Compressing the Columns of Reports: FOLD-LINE

How to:

Reference:

A single line on a report can be folded to compress it into fewer columns. This enables you to display a wide report on a narrow screen and enhance the appearance of many reports which might otherwise have wasted space under sort control fields which change infrequently.

Syntax: How to Compress Report Columns

display fieldname ... FOLD-LINE fieldname ...
{ON|BY} fieldname FOLD-LINE

where:

display

Is any display command.

fieldname

Causes columns to be placed on a separate line when the value of the field changes in the BY or ON phrase. The field name may be a sort field or display field. When it is a display field, it is placed under the preceding field.

Reference: Usage Notes for Compressing Report Columns

  • The second half of the folded line is offset by two spaces from the first part when the line is folded on a sort control field.
  • Instead of FOLD-LINE, you can also use the OVER phrase to decrease the width of reports, as described in Decreasing the Width of a Report: OVER.
  • When the point of line folding is after a display field, there is no offset. A simple way to change the line alignment is to use a title with leading blanks. See Creating New Column Titles: AS.
  • Up to 16 FOLD-LINE phrases can be used in a request.
  • Cell based styling features including BACKCOLOR and BORDERS are not supported with FOLD-LINE.

Example: Compressing Report Columns

The following report places all fields following the DEPARTMENT field on another line:

TABLE FILE EMPLOYEE
SUM ED_HRS BY DEPARTMENT
PRINT ED_HRS AND LAST_NAME AND FIRST_NAME
BY DEPARTMENT BY HIGHEST BANK_ACCT
ON DEPARTMENT FOLD-LINE
END

The output is:

DEPARTMENT                                              
----------                                              
  ED_HRS  BANK_ACCT  ED_HRS  LAST_NAME        FIRST_NAME
  ------  ---------  ------  ---------        ----------
MIS                                                     
  231.00  163800144   45.00  CROSS            BARBARA   
          122850108   75.00  BLACKWOOD        ROSEMARIE 
           40950036   50.00  JONES            DIANE     
                      36.00  SMITH            MARY      
                        .00  MCCOY            JOHN      
                      25.00  GREENSPAN        MARY      
PRODUCTION                                              
  120.00  819000702   30.00  IRVING           JOAN      
          136500120   50.00  MCKNIGHT         ROGER     
             160633     .00  BANNING          JOHN      
                      25.00  STEVENS          ALFRED    
                      10.00  SMITH            RICHARD   
                       5.00  ROMANS           ANTHONY   

Decreasing the Width of a Report: OVER

How to:

Reference:

One way to decrease the width of your report, particularly when using the ACROSS phrase, is to use OVER. OVER places field names over one another.

Syntax: How to Decrease the Width of a Report

display fieldname1 OVER fieldname2 OVER fieldname3 ...

where:

display

Is any display command.

fieldname1, fieldname2, fieldname3

Are fields to be placed over each other, instead of printed beside each other in a row. The field names must be display fields.

Reference: Usage Notes for Decreasing Report Width

Keep the following in mind when using OVER:

  • For more complex combinations of IN and OVER, you may want to create subfoots with data. Subfoots with data are discussed in Using Data in Headings and Footings.
  • Text fields cannot be specified with OVER.

Example: Decreasing the Width of a Report

The following report stacks the display fields over each other:

TABLE FILE EMPLOYEE
SUM GROSS OVER DED_AMT OVER
COMPUTE NET/D8.2M = GROSS - DED_AMT;
ACROSS DEPARTMENT
END

The request produces the following report. Notice the ACROSS values display to the left, not directly above the data values.

         DEPARTMENT                       
         MIS              PRODUCTION      
------------------------------------------
GROSS         $50,499.12       $50,922.38 
DED_AMT       $28,187.25       $23,391.35 
NET           $22,311.88       $27,531.03 

Without the OVER phrase, the report looks like this:

DEPARTMENT                                                                   
MIS                                        PRODUCTION                        
------------------------------------------------------------------------------------
GROSS       $50,499.12                     GROSS       $50,922.38            
DED_AMT       $28,187.25  NET  $22,311.88  DED_AMT       $23,391.35  NET  $27,531.03

Information Builders