totalAggregate

TotalAggregate properties are used to specify an aggregate function which applies to a column in Table or TreeTable, or pass a value from a 4GL routine. The result of the function execution will be displayed to the automatically added row at the bottom of the table column.

 

in Lycia Form Designer

 

Form XML code:

 

A Table column with Total Aggregate properties:

 

<TableColumn text="column" visible="true" identifier="tc_f8" totalAggregate="true" totalAggregateType="Avg"  totalAggregateText="Average:">

<!-- child element -->

<GridLength gridLengthType="Auto"/>

</TableColumn>

 

Possible values:

 

 

Default value:

 

 

Associated containers:

 

Table

TreeTable

 

Associated 4gl syntax:

 

DISPLAY ... TO

 

Influence and behavior:

 

To apply an aggregate function to a column, follow these steps:

 

  1. Set the TotalAggregate property to True

  2. Set the TotalAggregateText property. It specifies the string which is displayed before the result. For example, "Total: " for the Sum aggregate function.

  3. Set the TotalAggregateType property. It specifies the aggregate function which applies to the column. The possible values are:

 

 

  1. Set the TotalAggregateName property if TotalAggregateType is set to Program.

 

The image below shows how the standard TotalAggregate function (Sum) result is displayed. The TotalAggregateText is set to "Total:".

 

 

Setting TotalAggregateType property to Program allows to pass a specific value to the Total Aggregate field. To do it, specify the name for the aggregate field using the TotalAggregateName property, and use this name as a field identifier in the DISPLAY .. TO statement.

 

In the following example the value of the variable sal_cf will be displayed to the column's aggregate field where f_coefficient is specified as the TotalAggregateName:

 

DISPLAY sal_cf TO f_coefficient

 

CVS server: client.querix.com

CVS repository: /presentation

User: client

Project: form-demo3-2014

Program: fd2_panel_table_column_prop_total_aggregates

 

Table

TreeTable