PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Defining the calculations to perform
  • Configuring the position of the calculations
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
When a Table control contains numeric data, it may be useful to get the total of a column or count the number of elements.
WINDEV allows you to automatically perform and display calculations on columns:
  • sum,
  • average,
  • count,
  • maximum,
  • minimum.
Examples of calculations performed in the columns of a Table control:
  • the total number of parts ordered,
  • the number of students with an email address,
  • the average sum spent by each customer.
You can also define specific calculation formulas and display the result at the bottom of the relevant column programmatically. For more details, see Programming custom calculations in the tables.
Defining the calculations to perform
To perform one or more calculations on a column:
  1. Open the Table control description window ("Description" in the context menu).
  2. Select the column for which a calculation must be performed.
  3. Go to the "Details" tab of the column (in the lower part of the screen).
  4. Select the calculations to perform:
    Available calculations
    • sum of the cells in the column,
    • average of the cells in the column,
    • count of non-null values in the column. If the Table control contains merged cells, they are considered as having a null value.
    • minimum value of the column cells.
    • maximum value of the column cells. Remark: The available calculations depend on the type of column. The counter is available for all types of columns.
  5. Repeat steps 2 to 4 for all the columns for which a calculation must be performed.
Remark: the different calculations can be handled in the code using specific constants. For more details, see Programming calculations in the Table controls.
Configuring the position of the calculations
To configure the position of the calculations:
  1. Go to the "General" tab of the Table control (to do so, select the name of the Table control and click "General").
  2. In "Show results", indicate where the totals will appear. To display the results:
    • on one or more rows added directly after the last row of the control, select "After the last row, in the Table control".
      For example:
      Added rows
      These rows only appear:
      • at the bottom of the Table control if the control includes no vertical scrollbar.
      • when the vertical scrollbar is located at the very bottom if the Table control includes a vertical scrollbar.
    • below the Table control, select "Below the Table control".
      For example:
      Rows below the Table control
      These rows are always visible.
    • you can also perform automatic calculations without displaying them ("No display").
  3. If necessary, change the text displayed to the left of the calculations ("Modify captions").
  4. Validate the Table control description window.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment