| **Navigation:**  [[introduction.htm|Language Reference]] > 9 -  Window and Report Attributes > Window and Report Attributes > ====== MAX (set maximize control or total maximum) ====== | [[mask set pattern editing data entry .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[maximize set window open maximized .htm|{{btn_next_n.gif|Next page}}]] | | || **MAX( **[ //variable// ]** )** {{blk2blue.jpg|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|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|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|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 set window open as icon .htm|ICONIZE]] [[icon set icon .htm|ICON]] [[maximize set window open maximized .htm|MAXIMIZE]] [[imm set immediate event notification .htm|IMM]] [[tally set total calculation times .htm|TALLY]] [[reset set total reset .htm|RESET]] [[page set page total reset .htm|PAGE]] [[item_declare_a_menu_item_.htm|Menu ITEM]]