PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • How is the calculation performed?
  • Progress of calculation
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
Entirely calculates or recalculates a pivot table. Caution: this operation may take quite a long time.
Example
IF YesNo("Do you want to entirely recalculate the table?") THEN
PVTCalculateAll(PVT_Sales)
END
Syntax
PVTCalculateAll(<Pivot Table Control>)
<Pivot Table Control>: Control name
Name of Pivot Table control to calculate or recalculate.
Remarks

How is the calculation performed?

The calculation is performed by browsing all the necessary records. This calculation can be quite long according to the size of the database. For example, a calculation performed on one million records can take several minutes.
  • The content of the pivot table must be entirely recalculated:
    • When adding new items to display.
    • When modifying the filtering functions.
    • When modifying the source data of calculation.
  • The content of the pivot table does not have to be entirely recalculated:
    • When using a filter on a dimension that is already calculated.
    • When changing dimension.
    • When expanding or collapsing a dimension (to view the trimesters instead of the years for example).

Progress of calculation

  • A progress bar is displayed during the calculation of the Pivot Table control.
  • Versions 20 and later
    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:
    PROCÉDURE 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
    New in version 20
    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:
    PROCÉDURE 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
    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:
    PROCÉDURE 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.
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment