User Tools

Site Tools


max_set_maximize_control_or_total_maximum_.htm
Navigation:  Language Reference > 9 -  Window and Report Attributes > Window and Report Attributes > ====== MAX (set maximize control or total maximum) ====== Previous pageReturn to chapter overviewNext page

MAX( [ variable ] )

blk2blue.jpg

MAX Specifies a maximize control on an APPLICATION or WINDOW, or calculates the maximum value a REPORT STRING control's USE variable has contained so far.
variable The label of a numeric variable to receive the intermediate values calculated for the MAX (valid only in a REPORT). 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 by other “totaling” controls within the REPORT structure.

The MAX attribute (PROP:MAX) specifies a maximize control on an APPLICATION or WINDOW, or calculates the maximum value a REPORT STRING control's USE variable has contained so far. This attribute is valid in Clarion Win32 Windows, and also for REPORT structures in both Clarion Win32 and Clarion#.

Window Usage

black.jpg

The maximize control appears in the top right corner of the window as a box containing either an upward pointing triangle. When the user clicks the mouse on it, an APPLICATION or non-MDI WINDOW expands to occupy the full screen, an MDI WINDOW expands to occupy the entire APPLICATION. Once expanded, the maximize control appears as an upward pointing triangle above a downward pointing triangle. Click the mouse on it again, and the window returns to its previous size and the maximize control appears as an upward pointing triangle.

Menu ITEM Usage

black.jpg

A two-column drop menu can be achieved by assigning PROP:Max = 1 to the ITEM which should begin the second column. This displays as a Vertical Separator.

Report Usage

black.jpg

The MAX attribute specifies printing the maximum value the STRING control's USE variable has contained so far. Unless the TALLY attribute is present, the result is calculated as follows:

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

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

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

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

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

Example:

!A Window with a maximize button:
Win2 WINDOW,MAX
  END

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 Maximum:'),AT(5500,500)
           STRING(@N$11.2),AT(6000,500),USE(Pre:F1),MAX(LocalVar),RESET(Break2)
          END
         END
         FOOTER,AT(0,0,6500,1000),USE(?BreakOneGroupFoot)
          STRING('Grand Maximum:'),AT(5500,500)
          STRING(@N$11.2),AT(6000,500),USE(LocalVar),MAX,TALLY(?BreakTwo)
         END
        END
       END

See Also:

ICONIZE

ICON

MAXIMIZE

IMM

TALLY

RESET

PAGE

Menu ITEM

max_set_maximize_control_or_total_maximum_.htm.txt · Last modified: 2021/04/13 22:39 by carlbarnes