ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV 2024 feature!
Help / WLanguage / WLanguage functions / Controls, pages and windows / Pivot Table functions
  • Calculation mode
  • When to use PVTCalculateUpdateAsynchronous?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Updates some of the data found in a Pivot Table control from a given date without blocking the application.
Remarks:
  • The contents of the Pivot Table control must first have been loaded into memory using PVTLoad .
  • The Pivot Table control must include a column, row or filter of type Date.
Example
PVTCalculateUpdateAsynchronous(PVT_Statistics, Calculation_completed)
INTERNAL PROCEDURE Calculation_completed(bOK is boolean)
IF NOT bOK THEN
Error(ErrorInfo())
RETURN
END
END
Syntax
PVTCalculateUpdateAsynchronous(<Pivot Table control> [, <Start date>] [, <WLanguage procedure>])
<Pivot Table control>: Control name
Name of the Pivot Table control to be used.
<Start date>: Optional character string or Date variable
Date from which the content of the Pivot Table control must be recalculated. This date must be in "YYYYMMDD" format. All the records associated with a Date item whose content corresponds to a date greater than <Start date> will be taken into account.
If this parameter is not specified, the date taken into account corresponds to the maximum date of the last result calculated or read by PVTLoad.
<WLanguage procedure>: Optional procedure name
Name of the WLanguage procedure ("callback") called once the calculation is completed.
For more details on this procedure, see Parameters of the procedure used by PVTCalculateUpdateAsynchronous.
Remarks

Calculation mode

The records used to recalculate the data have the following characteristics:
  • The records have a Date item.
  • The content of the Date item is greater than or equal to the value of <Start date>.
Former values in the Pivot Table control (if any) are deleted from <Start date>.
The calculation can take a long time if a lot of data has to be read. PVTCalculateUpdateAsynchronous does not block the application and executes the specified WLanguage procedure after the calculation is completed.
Once the calculation is completed, the new Pivot Table is displayed. Then, the result can be saved by PVTSave.

When to use PVTCalculateUpdateAsynchronous?

PVTCalculateUpdateAsynchronous should be used when the data is fixed: invoices for example. You can only add new invoices. In this case, the recalculation date corresponds to the date on which the content of the Pivot Table control was last saved.
If the data displayed in the Pivot Table control can be modified (quantity, price, etc.), you must:
  • recalculate the entire Pivot Table control.
  • recalculate the Pivot Table control from the date on which the record was modified.
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/05/2024

Send a report | Local help