PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Defining the calculations to perform
  • Configuring the position of calculations
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
When a Table control contains numeric data, it may be useful to find out the total of a column or to count the number of elements.
WINDEV allows you to automatically perform and display calculations for the columns:
  • sum,
  • mean,
  • count,
  • Versions 22 and later
    maximum,
    New in version 22
    maximum,
    maximum,
  • Versions 22 and later
    minimum.
    New in version 22
    minimum.
    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.
Versions 22 and later
WINDEV By programming, you also have the ability to define specific calculation formulas and to display the result at the bottom of the relevant column. See Programming custom calculations in the tables for more details.
New in version 22
WINDEV By programming, you also have the ability to define specific calculation formulas and to display the result at the bottom of the relevant column. See Programming custom calculations in the tables for more details.
WINDEV By programming, you also have the ability to define specific calculation formulas and to display the result at the bottom of the relevant column. See Programming custom calculations in the tables for more details.
Defining the calculations to perform
To perform one or more calculations on a column:
  1. Display the description window of the Table control ("Description" from the popup menu).
  2. Select the name of a column for which a calculation must be performed.
  3. Display the "Details" tab of this column (in the lower part of the screen).
  4. Select the calculations to perform:
    • sum of column cells,
    • average of column cells,
    • count of non-null values in the column. If the Table control contains merged cells, they are considered as having a null value.
    • Versions 22 and later
      Minimum of values of column cells.
      New in version 22
      Minimum of values of column cells.
      Minimum of values of column cells.
    • Versions 22 and later
      Maximum of values of column cells.
      New in version 22
      Maximum of values of column cells.
      Maximum of values of column cells. Note: The available calculations depend on the type of column. The counter is available for all types of columns.
  5. Repeat the operations 2 to 4 for all the columns on which a calculation must be performed.
Note: the different calculations can be handled by programming via specific constants. See Programming calculations in the Table controls for more details.
Configuring the position of calculations
To configure the position of calculations:
  1. Display the "General" tab of the Table control (to do so, select the name of the Table control and click the "General" tab).
  2. Specify the location of totals. To display the results:
    • in one or more rows directly added after the last control row, check "In the table, after the last row".
      For example:
      These rows are visible:
      • 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, check "Below the table".
      For example:
      These rows are always visible:
    • You can also perform automatic calculations without displaying them ("No display").
  3. If needed, modify the caption displayed in front of the calculations ("Modify the captions" button).
  4. Validate the description window of Table control.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment