ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Pivot Table functions
  • How is data calculated?
  • Progress of calculation
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Entirely calculates or recalculates a Pivot Table control. Note: This operation may take some time.
Example
IF YesNo("Do you want to entirely recalculate the Pivot Table control?") THEN
	PVTCalculateAll(PVT_Sales)
END
Syntax
PVTCalculateAll(<Pivot Table control>)
<Pivot Table control>: Control name
Name of the Pivot Table control to calculate or recalculate.
Remarks

How is data calculated?

Data is calculated by iterating over all the necessary records. This can take a long time depending on the size of the database. For example, calculating one million records can take several minutes.
  • The content of the Pivot Table control must be entirely recalculated:
    • When adding new items.
    • When changing filter options.
    • When changing the source data.
  • The content of the Pivot Table control does not need to be entirely recalculated:
    • When using a filter on a dimension that is already calculated.
    • When changing dimension.
    • When expanding or collapsing a dimension (e.g. to display quarters instead of years).

Progress of calculation

  • A progress bar is displayed during the calculation of the Pivot Table control.
  • The user has the ability to cancel the calculation via a "Cancel" button.
    To find out whether the calculation was entirely performed, use the ErrorOccurred variable.
    Example:
    PROCEDURE Load_PVT()
    
    PVTCalculateAll(PVT_Statistics)
    IF ErrorOccurred = True THEN
    	SWITCH Dialog("Do you want to cancel the current process?")
    		// Cancel
    		CASE 1
    			Close()
    		// Continue
    		CASE 0
    			Load_PVT()
    	END
    END
Related Examples:
WD PivotTable Training (WINDEV): WD PivotTable
[ + ] This example presents the use of the Pivot Table control.

This Pivot Table control is used to display dynamic statistics while grouping the data.
These statistics are calculated form the database.
Business / UI classification: UI Code
Component: wd300obj.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/25/2024

Send a report | Local help