User Tools

Site Tools


min_set_total_minimum_.htm
Navigation:  Language Reference > 9 -  Window and Report Attributes > Window and Report Attributes >====== MIN (set total minimum) ====== Previous pageReturn to chapter overviewNext page

MIN( [ variable ] )

blk2blue.jpg

MIN Calculates the minimum value the STRING control's USE variable has contained so far.
variable The label of a numeric variable to receive the intermediate values calculated for the MIN. This allows you to create totals on other totals. The value in the variable is internally updated by the print engine, so it is only useful for use within the REPORT structure.

The MIN attribute (PROP:MIN) specifies printing the minimum value the STRING control's USE variable has contained so far. Unless the TALLY attribute is present, the result is calculated as follows:

·A MIN field in a DETAIL structure is evaluated each time the DETAIL structure containing the control PRINTs. This provides a “running” minimum value.

·A MIN field in a group FOOTER structure is evaluated each time any DETAIL structure in the BREAK structure containing the control PRINTs. This provides the minimum value of the variable in the group.

·A MIN field in a page FOOTER structure is evaluated each time any DETAIL structure in any BREAK structure PRINTs. This is the minimum value of the variable in the page (or report to date).

·A MIN field in a HEADER is meaningless, since no DETAIL structures will have been printed at the time the HEADER is printed.

The MIN value is reset only if the RESET or PAGE attribute is also specified.

Example:

CustRpt REPORT,AT(1000,1000,6500,9000),THOUS

Break1   BREAK(LocalVar),USE(?BreakOne)

Break2    BREAK(Pre:Key1),USE(?BreakTwo)

Detail     DETAIL,AT(0,0,6500,1000),USE(?DetailOne)

           STRING(@N$11.2),AT(6000,1500,500,500),USE(Pre:F1)

          END

          FOOTER,AT(0,0,6500,1000),USE(?BreakOneGroupFoot)

           STRING('Group Minimum:'),AT(5500,500)

           STRING(@N$11.2),AT(6000,500),USE(Pre:F1),MIN(LocalVar),RESET(Break2)

          END

         END

         FOOTER,AT(0,0,6500,1000),USE(?BreakOneGroupFoot)

          STRING('Grand Minimum:'),AT(5500,500)

          STRING(@N$11.2),AT(6000,500),USE(LocalVar),MIN,TALLY(?BreakTwo)

         END

        END

       END

min_set_total_minimum_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1