PC SOFT

WINDEV的在线文档

  • Overview
  • Defining the calculations to perform
  • Configuring the position of calculations
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview
When a Table control contains numeric data, it is interesting to find out the total of a column or to count the number of elements.

WinDev allows you to automatically perform and display calculations (sum, mean or count) for the numeric, currency and check box columns.

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.

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 the column cells,
    • average of the column cells,
    • count of the non-null values in the column. If the Table control contains merged cells, they are considered as having a null value.
  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 the totals. To display the results:
    • in one or more rows directly added after the last row of the control, 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 the Table control.