In this section: |
Starting in FOCUS 7.6.11, you can prevent the generation of blank lines on report output and control titles for columns generated using a prefix operator.
How to: Reference: |
By default, FOCUS inserts blank lines around subtotals, subheadings, and subfootings when formatting a report for output. In addition, certain data lines may be blank and appear as blank lines on the report output. You can eliminate these blank lines from the report output using the SET DROPBLNKLINE=ON command.
Note that blank lines specifically inserted by the user as part of heading, footings, subheadings, and subfootings are not eliminated by this command.
SET DROPBLNKLINE = {OFF|ON}
where:
Leaves blank lines in data and blank lines automatically inserted by FOCUS in the report output. OFF is the default value.
Removes blank lines of data and blank lines automatically inserted by FOCUS from the report output.
The following request against the EMPLOYEE data source has a heading, a subtotal and a subfooting:
SET DROPBLNKLINE = OFF TABLE FILE EMPLOYEE HEADING " Page <TABPAGENO This is the heading" PRINT CURR_SAL AS '' BY DEPARTMENT NOPRINT WHERE CURR_SAL NE 0.0 ON DEPARTMENT SUBTOTAL ON DEPARTMENT SUBFOOT "THIS SUBFOOTING IS FOR DEPARTMENT <DEPARTMENT " ON TABLE HOLD FORMAT PDF END
With SET DROPBLNKLINE=OFF, a blank line is generated before each subtotal, the grand total, and each subfooting:
With SET DROPBLNKLINE=ON, the blank lines are not generated:
In this version of the request, the heading explicitly inserts a blank line:
SET DROPBLNKLINE = ON TABLE FILE EMPLOYEE HEADING " Page <TABPAGENO This is the heading" " " PRINT CURR_SAL AS '' BY DEPARTMENT NOPRINT WHERE CURR_SAL NE 0.0 ON DEPARTMENT SUBTOTAL ON DEPARTMENT SUBFOOT "THIS SUBFOOTING IS FOR DEPARTMENT <DEPARTMENT " ON TABLE HOLD FORMAT PDF END
With either setting for DROPBLNKLINE, the blank line explicitly inserted by the request is retained:
How to: |
The TITLE attribute in a Master File provides an alternate column heading for a field. The value of the TITLES parameter determines whether the title or the field name is used as the column heading on report output.
SET TITLES = {ON|OFF|NOPREFIX}
ON TABLE SET TITLES {ON|OFF|NOPREFIX}
where:
Displays the value of the TITLE attribute as the column heading on the report output, if a TITLE attribute exists in the Master File. If the field has a prefix operator in the report request, creates the column heading using both the prefix operator and the TITLE attribute. If there is no TITLE attribute, the field name is used instead. ON is the default value.
Displays the field name as the column heading on the report output. If the field has a prefix operator in the report request, creates the column heading using both the prefix operator and the field name.
Displays the value of the TITLE attribute as the column heading on the report output, if a TITLE attribute exists in the Master File. If there is no TITLE attribute, the field name is used instead. If the field has a prefix operator in the report request, creates the column heading using both the prefix operator and the field name.
Note that if the field is assigned an AS name in the report request, the AS is used as the column heading on the report output.
The following table illustrates how column headings are generated:
TITLES Parameter |
TITLE Attribute |
Column Heading for Field Without Prefix Operator |
Column Heading for Field With Prefix Operator |
---|---|---|---|
OFF, ON, or NOPREFIX |
No |
Field Name |
Prefix + Field Name |
OFF |
Yes |
Field Name |
Prefix + Field Name |
NOPREFIX |
Yes |
TITLE |
Prefix + Field Name |
ON |
Yes |
TITLE |
Prefix + TITLE |
For this example, add the following TITLE attributes to the LAST_NAME and SALARY fields in the EMPLOYEE Master File:
FIELDNAME=LAST_NAME, ALIAS=LN, FORMAT=A15, TITLE=SURNAME, $ FIELDNAME=SALARY, ALIAS=SAL, FORMAT=D12.2M, TITLE=PAY, $
The following TABLE request displays the average salary of each employee by last name and first name. The ON TABLE command sets the TITLES attribute to OFF:
TABLE FILE EMPLOYEE SUM AVE.SALARY BY LAST_NAME BY FIRST_NAME ON TABLE SET TITLES OFF END
With SET TITLES=OFF, field names are used as column headings. The heading for the AVE.SALARY column is generated by combining the prefix operator AVE with the field name SALARY:
AVE LAST_NAME FIRST_NAME SALARY --------- ---------- ------ BANNING JOHN $29,700.00 BLACKWOOD ROSEMARIE $21,780.00 CROSS BARBARA $26,418.50 GREENSPAN MARY $8,825.00 IRVING JOAN $25,641.00 JONES DIANE $18,115.00 MCCOY JOHN $18,480.00 MCKNIGHT ROGER $15,550.00 ROMANS ANTHONY $21,120.00 SMITH MARY $13,200.00 RICHARD $9,275.00 STEVENS ALFRED $10,500.00
Now issue the same request with the TITLES attribute set to ON (the default value):
TABLE FILE EMPLOYEE SUM AVE.SALARY BY LAST_NAME BY FIRST_NAME ON TABLE SET TITLES ON END
With SET TITLES=ON, the TITLE attributes are used as column headings for those fields that have TITLE attributes. The FIRST_NAME field does not have a TITLE attribute, so the field name is used for that column. The heading for the AVE.SALARY column is generated by combining the prefix operator AVE with the TITLE attribute PAY:
AVE SURNAME FIRST_NAME PAY ------- ---------- ---- BANNING JOHN $29,700.00 BLACKWOOD ROSEMARIE $21,780.00 CROSS BARBARA $26,418.50 GREENSPAN MARY $8,825.00 IRVING JOAN $25,641.00 JONES DIANE $18,115.00 MCCOY JOHN $18,480.00 MCKNIGHT ROGER $15,550.00 ROMANS ANTHONY $21,120.00 SMITH MARY $13,200.00 RICHARD $9,275.00 STEVENS ALFRED $10,500.00
Now issue the same request with the TITLES attribute set to NOPREFIX:
TABLE FILE EMPLOYEE SUM AVE.SALARY BY LAST_NAME BY FIRST_NAME ON TABLE SET TITLES NOPREFIX END
With SET TITLES=NOPREFIX, TITLE attributes are used as column headings for fields without prefix operators, and field names are used for fields with prefix operators. The TITLE attribute is used for the LAST_NAME column, but the field name is used for the AVE.SALARY column:
AVE SURNAME FIRST_NAME SALARY ------- ---------- ------ BANNING JOHN $29,700.00 BLACKWOOD ROSEMARIE $21,780.00 CROSS BARBARA $26,418.50 GREENSPAN MARY $8,825.00 IRVING JOAN $25,641.00 JONES DIANE $18,115.00 MCCOY JOHN $18,480.00 MCKNIGHT ROGER $15,550.00 ROMANS ANTHONY $21,120.00 SMITH MARY $13,200.00 RICHARD $9,275.00 STEVENS ALFRED $10,500.00
The following TABLE summarizes how the column headings were generated for the fields with TITLE attributes in the Master File:
FIELD | TITLE Attribute | TITLES Parameter | Column Heading |
---|---|---|---|
LAST_NAME | SURNAME | OFF ON NOPREFIX | LAST_NAME SURNAME SURNAME |
AVE.SALARY | PAY | OFF ON NOPREFIX | AVE,SALARY AVE,PAY AVE,SALARY |
Information Builders |