Search Results for

    Show / Hide Table of Contents

    Interactive sort

    The sort button MatrixSortButton allows you to interactively sort the rows or columns of the matrix. The button should be inserted into a lower-level header element:

    When you click on the button in the preview window, the opposite header is sorted. The example below sorts rows by value in the selected column:

    Each press of the button switches the sort mode: ascending/descending/no sort.

    Adding a button

    You can add a button to a header element using the context menu. Select the element, right-click and select "Sort Button". The button will be added to the right part of the element.

    When you add a button, the element's Property Padding.Right changes so that the button does not overlap the text.

    Button customization

    The header sort mode is set in its editor on the "Sort/Interactive Sort" by Total tab. The following values are possible:

    • "No" - this header is not sorted.
    • "Auto" is the default mode. Sort is performed by the value of the first total (aggregate).
    • Total (aggregate) name: if the header has several output values, you can select one of them to sort. In the example below, to sort the row header by the ItemsSold value, select the Sum ([MatrixDemo.ItemsSold]) aggregate:

    Removing a button

    There are two ways to remove a button:

    • select the button and press the Delete key;
    • uncheck the "Sort button" item in the context menu of the element.

    Moving a button

    By default, the button has Property Dock = Right. This means that it is docked to the right edge of the element. To move the button to a new location, set Property Dock = None in the Properties window.

    You can also use the Property Anchor of a button to anchor it to a specific location on an element.

    Customizing button appearance

    Using the "Border" toolbar, you can customize the button icon: frame color and style, background color. You can also set the following properties of the button in the Properties window:

    Property Default value Description
    AllowInactiveSort True Determines whether the button can be in an inactive state ("no sort" mode).
    Cursor Hand Mouse cursor shape.
    Exportable False If true, the button will be displayed when exporting the report.
    InactiveSortColor Gray Button color in inactive state.
    Printable False If true, the button will be displayed when printing a report.
    Symbol Arrow Button symbol.
    SymbolSize 7 Button symbol size.
    Back to top © 1998-2025 Copyright Fast Reports Inc.