PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • When are the calculations performed?
  • Retrieving the calculation result
  • Modifying the characteristics of calculations by programming
  • Properties that can be used on the calculation cells of columns
  • Exporting the results of calculations
  • Export via the AAF (Automatic Application Features) of Table control
  • Export via the WLanguage functions
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
When are the calculations performed?
The calculations are performed:
  • when initializing the Table control.
  • when a process performs an addition or modification in a Table control with calculations:
    • the totals are re-calculated at the end of process (or when using Multitask).
    • if the value of a calculation is requested (see next paragraph), the calculation is instantly rerun.
..TotalsEnabled is used to forbid or force the calculations performed in a Table control.
Retrieving the calculation result
The result of calculations performed in a Table control can be handled by programming.
Several constants are used to identify the calculation row of a column:
rowCountRow containing the result of the count.
Versions 22 and later
rowMaximum
New in version 22
rowMaximum
rowMaximum
Row containing the maximum value of column cells.
Versions 22 and later
rowMinimum
New in version 22
rowMinimum
rowMinimum
Row containing the minimum value of column cells.
rowAverageRow containing the result of a mean.
rowTotalRow containing the result of a total.
To retrieve the value of a calculation, use the following syntax:
<Column Name> [<Type of Calculation>]
Example:
// Retrieve the result for the average calculated in the COL_GRADE column
Trace(COL_GRADE[rowAverage])
Modifying the characteristics of calculations by programming
WINDEV allows you to modify the characteristics (font, color, ...) of a column result by programming with several WLanguage properties. The WLanguage properties can be used to modify the color of result, its background color, its font, ... However, the content of result cell cannot be modified by programming.
To use a WLanguage property on the result of a column, the following syntax must be used:
<Column Name>[<Type of Calculation>]..<Property>
Example:
// Color the mean result in red. The background is colored in blue
COL_GRADE[rowAverage]..Color = LightRed
COL_GRADE[rowAverage]..BrushColor = LightBlue

Properties that can be used on the calculation cells of columns

ColorUsed to find out and modify the color of the text displayed in a calculation cell.
BrushColorUsed to find out and modify the background color of a calculation cell.
StateUsed to find out and modify the display status of the row containing the calculation cell.
HeightUsed to find out and modify the height of a calculation cell.
WidthUsed to find out and modify the width of a calculation cell.
CaptionUsed to find out and modify the caption of the row containing a calculation cell.
NameUsed to find out the name of a calculation cell.
NoteUsed to find out and modify the notes associated with a calculation cell.
FontAllows you to find out and modify the font used in a calculation cell.
FontStrikeOutUsed to find out and modify the "StrikeOut" attribute for a calculation cell.
FontCondensedUsed to find out whether the characters of column elements are condensed or not, and to condense (or not) the characters of column elements.
FontExtendedUsed to find out whether the characters of column elements are extended or not, and to extend (or not) the characters of column elements.
FontBoldUsed to find out and modify the "Bold" attribute for the column elements.
FontItalicUsed to find out and modify the "Italic" attribute for the column elements.
FontLargeUsed to find out whether the characters of column elements are enlarged or not, and to enlarge (or not) the characters of column elements.
FontNameUsed to find out and modify the font used for the column elements.
FontUnderlinedUsed to find out and modify the "Underline" attribute for the column elements.
FontSizeUsed to find out and modify the size of the font used for the column elements.
VisibleUsed to find out whether a column is visible and to make a column visible/invisible.
Exporting the results of calculations
WINDEVWindows

Export via the AAF (Automatic Application Features) of Table control

The popup menu of Table and TreeView Table controls proposes several options used to export the control content.
During this export, the results of automatic calculations are exported.
Notes:
  • Only the value is exported, not the caption.
  • During the export in Excel, the cell corresponding to the calculation contains the corresponding Excel formula.

Export via the WLanguage functions

Several WLanguage functions can be used to export the content of a Table control in a specific format (Word, Excel, XML, ...). During this export, the rows corresponding to calculations are also exported by default.
To avoid exporting the calculation rows, all you have to do is specify the taNoTotal constant in the following functions:
Versions 12 and later
TableToClipboard
New in version 12
TableToClipboard
TableToClipboard
Copies the content of a Table or TreeView Table control into the clipboard.
Versions 09 and later
TableToExcel
New in version 09
TableToExcel
TableToExcel
Creates an Excel file from the data found in a Table or Treeview Table control .
Versions 12 and later
TableToText
New in version 12
TableToText
TableToText
Creates a character string from the data found in a Table or TreeView Table control.
Versions 09 and later
TableToWord
New in version 09
TableToWord
TableToWord
Creates a Word file (.RTF) from the data found in a Table or Treeview Table control.
Versions 09 and later
TableToXML
New in version 09
TableToXML
TableToXML
Creates an XML file from the data found in a Table or TreeView Table control .
Minimum required version
  • Version 9
This page is also available for…
Comments
Properties of totalizers
Na dica de hoje..
Vou ensinar como modificar as
propriedades dos totalizadores
da tabela

In today's tip ..
I will teach you how to
Properties of totalizers
Of the table

https://forum.pcsoft.fr/pt-BR/pcsoft.br.windev/2255-aula-1111-windev-tabela-058-modificar-propriedades-dos/read.awp

http://windevdesenvolvimento.blogspot.com.br/2017/04/aula-1111-windev-tabela-058-modificar.html

https://www.youtube.com/watch?v=IyZH51bwDvM
De matos
Apr. 05 2017