Official Content

You can use this property to act programmatically on the chart elements. It contains the name of the variable based on the QueryViewerElements SDT.


&Elements Name of the variable that will implement the changes’ inherent properties. This is the default value.

QueryViewerElements SDT Structure



For the following example, the following query is taken as a reference.


The information displayed can often be lengthy when the elements that comprise it are expanded (default setting). This may be easily avoided by collapsing all the elements starting from the first one, or from another element close to the first one. Later on, the user will expand those nodes as needed.

In the image below, the PivotTable is completely expanded.


The following code shows how to completely collapse all the elements for the Brand element.

Event Start
    &Element = New()
    &Element.Name = !"CarBrandName"
    &Element.ExpandCollapse.Type = QueryViewerExpandCollapse.CollapseAllValues

The result would be as follows:


Besides, if you don't want to display its subtotals, you can add the following to the previous code:

    &Element.Format.Subtotals = QueryViewerSubtotals.No

and the result would be as shown in the image below.



Output type: Table, PivotTable, Chart, Card

Last update: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant