FORM.BREAKn

Use the FORM.BREAKn panels to make choices about the text and its placement for up to six breaks in a report. QMF places that text after its associated break in the report.

FORM.BREAKn does not affect charts.

Specify a break usage code in the USAGE entry area ( B ) on FORM.MAIN or FORM.COLUMNS opposite one of the column names (see pages FORM.MAIN and FORM.COLUMNS). That column then becomes the control column and a break occurs in the report whenever the value in this control column changes.

When evaluating values in VARCHAR columns, QMF differentiates between a value padded with blanks or hexadecimal zeros and the same values without these trailing characters. Using FORM.BREAKn in such cases creates a break.

You can use the same level of break on multiple columns. In this case, a break occurs when a value changes in any one of those columns.

Area  I  on FORM.MAIN specifies footing text for BREAK1 and BREAK2 in a report and whether to start a new page each time the value in the control column changes. Whatever you specify in area  I  of FORM.MAIN is reflected on FORM.BREAK1 and FORM.BREAK2. What you specify on areas  H  and  N  on BREAK1 and BREAK2 is reflected on FORM.MAIN.

There are six FORM.BREAKn panels -- one for each possible level of break. They are all the same, except for the panel title.

FORM.BREAK1
 
 A New Page for Break?        ===> NO    B Repeat Detail Heading?   ===> NO
 C Blank Lines Before Heading ===> 0     D Blank Lines After Heading ===> 0
 E LINE F ALIGN G BREAK1 HEADING TEXT
    ----    ------   ----+----1----+----2----+----3----+----4----+----5----+
    1       LEFT
    2       LEFT
    3       LEFT
            *** END ***
 
 H New Page for Footing?      ===> NO    I Put Break Summary at Line ===> 1
 J Blank Lines Before Footing ===> 0     K Blank Lines After Footing ===> 1
 L LINE M ALIGN N BREAK1 FOOTING TEXT
    ----    ------   ----+----1----+----2----+----3----+----4----+----5----+
    1       RIGHT
    2       RIGHT
    3       RIGHT
            *** END ***
 
 1=Help        2=Check     3=End     4=Show        5=Chart       6=Query
 7=Backward    8=Forward   9=       10=Insert     11=Delete     12=Report
 OK, FORM.BREAK1 is displayed.
 COMMAND ===>                                            SCROLL ===> PAGE
 
 A  New page for break?
Specify whether to begin a new page whenever the value in the control column for the break changes. This value affects printed and exported reports. It does not affect displayed reports. A new page is started if the report is not already at the top of the page.

Specifying YES for more than one break level can produce more pages than expected in your printed or exported report. This happens when multiple breaks occur at the same time.

If you specify two or more breaks and also specify YES for New page for break on each break, a page is generated for each specified break whenever the highest break level occurs. Multiple breaks frequently occur together, since the highest break level forces all lower break levels to occur. In particular, all breaks occur for the first row of data in a report.

 B  Repeat detail heading?
Specify whether the detail heading is to be repeated at the beginning of each new break level following the break heading text and before the detail block text.

In printed reports, if a break begins at the top of a page and you specify YES, only one set of detail headings appears.

Detail headings consist of the detail heading text specified on the FORM.DETAIL panel, plus column headings (unless you suppress column headings on the FORM.DETAIL panel). See FORM.DETAIL.

Specifying YES for Repeat Detail Headings on FORM.DETAIL overrides the specifications given here.

 C  Blank lines before heading
Enter the number of blank lines before the first line of the break heading text, if specified, or before the first break member line if there is no break heading text. The value can be any number from 0 through 999.
 D  Blank lines after heading
Enter the number of blank lines after the last line of the break heading text, if specified. This entry can be any number from 0 through 999.
 E  LINE
Identify the lines of break heading text and specify their position relative to themselves and to the line at which the break heading starts (as indicated in the Blank Lines Before Heading entry area). You can specify any number from 1 through 999 or a blank. If blank, QMF ignores any associated text.

The numbers you choose need not start with 1 or be consecutive.

For example, these values on FORM.BREAK1:

LINE  ALIGN  BREAK1 HEADING TEXT
----  -----  -------------------
3     LEFT   DEPARTMENT &4
2     LEFT   BEGINNING OF LISTING
 

display as:

BEGINNING OF LISTING
DEPARTMENT 35

Notice that a blank line appears before the first line of text.

 F  ALIGN
Specify where each line of the break heading text is to be placed horizontally in the report. You can place the lines anywhere in the width of the report. For an online report, the width is the width of the displayed report; for a printed report, the width is the page width.
Left
Left-justifies the break heading text.
Right
Right-justifies the break heading text.
Center
Centers the break heading text.
n
Begins the break heading text in the nth position of the line. n can be any number from 1 through 999999.
Append
Attaches the line to the end of the previous line of break heading text. If append is used on the first line of break heading text, the line of text is left-justified.

The appended line of text must have the same LINE value as the line of text it is being appended to. If the report is not wide enough to accommodate the appended line of text, some of the text might be truncated.

For example, the following entries on FORM.BREAK1:

Blank Lines Before Heading ===> 0
LINE  ALIGN   BREAK1 HEADING TEXT
----  ------  ----------------------
1     LEFT    DEPARTMENT
1     APPEND   &4
3     LEFT
 

align the columns in the resulting report as shown:

              DEPT        COMM  JOB        SALARY
            ------  ----------  -----  ----------
          DEPARTMENT 66
                66       55.50  CLERK    10988.00
                             -  MGR      18555.50
                        844.00  SALES    16858.20
                        200.30  SALES    21000.00
                        811.50  SALES    18674.50
                                       ----------
                                    *    86076.20
 
          DEPARTMENT 84
                84      188.00  CLERK    13030.50
                             -  MGR      19818.00
 G  BREAK1 HEADING TEXT
Enter the heading text you want associated with the break. Every time the value in the break column changes, the text specified in this entry is displayed in the report. You can add up to 999 lines of break heading text using the INSERT command. Each line of text can be up to 55 characters long. You can add text to the line by using APPEND as the ALIGN value, or by specifying a specific horizontal position.

If your installation supports DBCS data, see Names with double-byte characters.

By default, break heading text extends from the left to the right margin of a report. However, you can choose the width of break heading text on the Report text line width entry on FORM.OPTIONS (see pageFORM.OPTIONS).

To make the break heading text appear in a report in uppercase and lowercase, specify in your profile a CASE value of either STRING or MIXED.

STRING
Displays break heading text as entered, but converts any other input to uppercase.
MIXED
Displays all input exactly as entered.

Break heading text can contain the following variables:

Global variables
Use SET GLOBAL to set variables for use in break heading text. See SET GLOBAL for details about this command.
&n
n is a number that represents the current row in column n on the form used for this report. Column n is not necessarily the nth column that you see in a report. It is the nth column listed on FORM.MAIN and FORM.COLUMNS. For example, this break heading text:
BEGINNING OF DEPARTMENT &3
might display this line on a report:
BEGINNING OF DEPARTMENT 38

The following variables can also be used with DATE, TIME, and TIMESTAMP values in break heading text:

&DATE
The current date is formatted according to the installation default, which reflects one of the following date formats:
  • USA (United States of America)
  • EUR (European)
  • ISO (International Standards Organization)
  • JIS (Japanese Industrial Standard)
  • An alternative date format supplied by your installation
&TIME
The current time is formatted according to the installation default, which reflects one of the formats listed under &DATE.
&PAGE
The page number is printed on each page when the report is formatted.

If a page in a report is wider than either the printer width or the default printing width specified in your PROFILE, QMF splits the page. It gives all parts of the split page the same page number, but with subscripts. (If you are using DBCS data and QMF splits the page, printing resumes on the second and subsequent pages of the report at the fourth byte position from the left side of the page.)

&ROW
The number of the first data row within the current break level is printed or displayed in your report.
 H  New page for footing?
Specify whether to begin a new page (if the report is printed) before displaying any break footing text specified. A new page is started if the report is not already at the top of the page.
 I  Put break summary at line
Specify whether the break summary is to be formatted, and, if so, where it is to be placed in relation to the lines of break footing text. The value for this entry can be any number from 1 through 999 or the word NONE (no break summary).
 J  Blank lines before footing
Specify the number of blank lines before the first line of break footing. This entry can be any number from 0 through 999 or the word BOTTOM.
 K  Blank lines after footing
Specify the number of blank lines after the last line of the break footing text. The value for this entry can be any number from 0 through 999.

If you specify a break and you have a column-wrapped column with a usage code of FIRST, LAST, MIN, or MAX, you might need to increase the value in this field to see all the wrapped lines in the break summary. For information on column wrapping, see the CW entry in Edit Codes for Character Data.

 L  LINE
Identify the lines of break footing text and specify their position relative to themselves and to the line at which the break footing starts (as indicated in the Blank Lines Before Footing entry area). You can specify any number from 1 through 999 or a blank. A blank ignores any associated text.

The numbers you choose need not start with 1 or be consecutive.

For example, these values on FORM.BREAK1:

LINE  ALIGN  BREAK1 FOOTING TEXT
----  -----  -------------------
3     LEFT   DEPARTMENT &4
2     LEFT   END OF LISTING
 

Display as:

END OF LISTING
DEPARTMENT 35
 M  ALIGN
Specify where each line of the break footing text is to be placed horizontally in the report. For breaks without break summaries, you can place the lines of break footing text anywhere in the width of the report. The width of the report is shown at the top of FORM.MAIN.

For breaks with break summaries created with usage codes (except OMIT, BREAKn, GROUP, or ACROSS), QMF places the lines of break footing text anywhere from the left margin to the beginning of the indent area associated with the leftmost column of summary data.

Left
Left-justifies the break footing text.
Right
Right-justifies the break footing text.
Center
Centers the break footing text.
n
Begins the break footing text in the nth position of the line. n can be any number from 1 through 999999.
Append
Positions the line at the end of the previous line of break footing text. If APPEND is used for a line of text that is not appended to another line, the line of text is left-justified.

The appended line of text must have the same LINE value as the line of text it is being appended to. If the report is not wide enough to accommodate the appended line of text, some of the text might be truncated.

For example, the following entries on FORM.BREAK1:

LINE  ALIGN   BREAK1 FOOTING TEXT
----  ------  ----------------------
1     RIGHT   TOTAL
1     APPEND   SALARIES--DEPT. &4;
3     RIGHT
4     RIGHT
5     RIGHT
 

align columns as shown in the resulting report.

       DEPT        COMM  JOB        SALARY
     ------  ----------  -----  ----------
         66       55.50  CLERK    10988.00
                      -  MGR      18555.50
                 844.00  SALES    16858.20
                 200.30  SALES    21000.00
                 811.50  SALES    18674.50
                                ----------
      TOTAL SALARIES--DEPT. 66    86076.20
 
         84      188.00  CLERK    13030.50
                      -  MGR      19818.00
                 806.10  SALES    15454.50
                1285.00  SALES    17844.00
                                ----------
      TOTAL SALARIES--DEPT. 84    66147.00

 N  BREAK1 FOOTING TEXT
Enter the footing text you want associated with the break. Every time the value in the break column changes, the text specified in this entry is displayed in the report. You can add up to 999 lines of break footing text using the INSERT command. Each line of text can be up to 55 characters long. You can add text to the line by using APPEND as the ALIGN value, or by specifying a specific horizontal position.

If your installation supports DBCS data, see Names with double-byte characters.

By default, break footing text extends from the left margin of a report either to the beginning of the break summary data (if any), or to the right margin of a report. However, you can choose the width of break footing text on the Report text line width entry on FORM.OPTIONS (see pageFORM.OPTIONS).

To make the break footing text appear in a report in uppercase and lowercase, specify in your profile a CASE value of either STRING or MIXED.

STRING
Displays break footing text as entered, but converts any other input to uppercase.
MIXED
Displays all input exactly as entered.

Break footing text can contain the following variables:

Global variables
Use SET GLOBAL to set variables for use in break footing text. See SET GLOBAL for details.
&n
n is a number that stands for the most current value in column n on the form used for this report. Column n is not necessarily the nth column that you see in a report. It is the nth column selected from the database, or the nth column listed on FORM.MAIN and FORM.COLUMNS.

For example, this break footing text:

END OF DEPARTMENT &3

Might display this line on a report:

END OF DEPARTMENT 38
&COUNT
The number of rows retrieved or printed since the last break at the same level. This value increases from data row to data row.
&ROW
The number of the last data row is printed or displayed in your report.

&CALCid
Calculated value
&DATE
The current date
&TIME
The current time
&PAGE
The current page number

For a description of &CALCid, see FORM.CALC.

For descriptions of &DATE, &TIME, and &PAGE, see page*** under BREAK1 HEADING TEXT.

&an
n is a valid column number and a is one of the following QMF aggregation functions: AVG, COUNT, CPCT, CSUM, FIRST, LAST, MAX, MIN, PCT, STDEV, SUM, TCPCT, TPCT. The values of the aggregations are based on running values within the current break level.

For example, assume the fourth column of the report contains salaries and you want to summarize the salaries in each group in break footing text.

Write in the BREAK1 FOOTING TEXT:

TOTAL SALARY FOR DEPARTMENT &3 IS &SUM4

For example, the resulting line of break footing text in the report would be:

TOTAL SALARY FOR DEPARTMENT 38 IS $77,285.55

If you specify the aggregation variable in break footing text, you need not specify that same aggregation as the usage for that column. However, the aggregation must be compatible with the edit code and data type of the column. For example, you cannot specify &SUM3 in your final text if the data in column 3 has a character edit code.

If you use an aggregation variable with percent (PCT, TPCT, or TCPCT) in break footing text, and if you associate it with a column that has a D edit code, QMF formats the percent value as if it had an L edit code. Likewise, if you use the aggregation variable standard deviation and associate it with a column that has a P or a D edit code, QMF formats the standard deviation as if it had an L edit code.

For more information, see the L code under Edit Codes for Numeric Data and Variables Used in Forms.

[ Previous Page | Next Page | Contents | Index ]