PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Saving and loading a Pivot Table control
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
Saves the result of the calculation performed in a Pivot Table control (in a file or in memory). This backup can be reloaded in a Pivot Table control by <Pivot table>.Load.
Example
sFichier est une chaîne
// Construit le nom du fichier
sFichier = SysRep(srAppData) + ["\"] + "StatsParPays.tcd"
 
// Le fichier existe?
SI fFichierExiste(sFichier) ALORS
// Oui, on le charge
TCD_Statistiques.Charge(sFichier)
SI OuiNon("Voulez-vous tout recalculer?") ALORS TCD_Statistiques.CalculeTout()
SINON
// Le fichier n'existe pas, on le calcule
TCD_Statistiques.CalculeTout()
FIN
TCD_Statistiques.Sauve(sFichier)
Syntax

Saving a Pivot Table control with its interface and a password Hide the details

<Result> = <Pivot Table control>.Save(<Backup media> [, <Backup mode> [, <Password>]])
<Result>: Type depending on the backup media
Versions 21 and later
  • Backup in memory: Buffer containing the backup. Then, this backup can be saved in a file (fSaveBuffer), ...
  • Backup in a file:
    • True if the backup has been performed,
    • False otherwise.
New in version 21
  • Backup in memory: Buffer containing the backup. Then, this backup can be saved in a file (fSaveBuffer), ...
  • Backup in a file:
    • True if the backup has been performed,
    • False otherwise.
  • Backup in memory: Buffer containing the backup. Then, this backup can be saved in a file (fSaveBuffer), ...
  • Backup in a file:
    • True if the backup has been performed,
    • False otherwise.
<Pivot Table control>: Control name
Name of Pivot Table control to use.
<Backup media>: Character string (with quotes) or constant
  • Versions 21 and later
    Backup in memory: inMemory constant: Saves the content of the Pivot Table control in memory. <Resultat> contains the backup result.
    New in version 21
    Backup in memory: inMemory constant: Saves the content of the Pivot Table control in memory. <Resultat> contains the backup result.
    Backup in memory: inMemory constant: Saves the content of the Pivot Table control in memory. <Resultat> contains the backup result.
  • Backup in a file: Name and full path of the file where the content of Pivot Table control will be saved.
<Backup mode>: Optional Integer constant
By default, only the data is saved. You also have the ability to save the interface of Pivot Table control:
pvtWithUISaves the configuration of Pivot Table control:
  • size of columns,
  • size of rows,
  • collapsed/expanded row headers or column headers.
Remark: Prior to version 25, this constant was called tcdWithIHM.
Versions 19 and later
If <Backup Mode> and <Password> are not specified, only the data found in the Pivot Table control will be saved and the backup will not be password protected. To save the data only and to protect the backup by a password, use the syntax 2.
New in version 19
If <Backup Mode> and <Password> are not specified, only the data found in the Pivot Table control will be saved and the backup will not be password protected. To save the data only and to protect the backup by a password, use the syntax 2.
If <Backup Mode> and <Password> are not specified, only the data found in the Pivot Table control will be saved and the backup will not be password protected. To save the data only and to protect the backup by a password, use the syntax 2.
<Password>: Optional character string (with quotes)
Versions 19 and later
Password for the backup. If the backup is password protected, this password will have to be specified when the backup is loaded by <Pivot table>.Load.
New in version 19
Password for the backup. If the backup is password protected, this password will have to be specified when the backup is loaded by <Pivot table>.Load.
Password for the backup. If the backup is password protected, this password will have to be specified when the backup is loaded by <Pivot table>.Load.

Saving a Pivot Table control without its interface and with a password Hide the details

<Result> = <Pivot Table control>.Save(<Backup media> [, <Password>])
<Result>: Type depending on the backup media
Versions 21 and later
  • Backup in memory: Buffer containing the backup. Then, this backup can be saved in a file (fSaveBuffer), ...
  • Backup in a file:
    • True if the backup has been performed,
    • False otherwise.
New in version 21
  • Backup in memory: Buffer containing the backup. Then, this backup can be saved in a file (fSaveBuffer), ...
  • Backup in a file:
    • True if the backup has been performed,
    • False otherwise.
  • Backup in memory: Buffer containing the backup. Then, this backup can be saved in a file (fSaveBuffer), ...
  • Backup in a file:
    • True if the backup has been performed,
    • False otherwise.
<Pivot Table control>: Control name
Name of Pivot Table control to use.
<Backup media>: Character string (with quotes) or constant
  • Versions 21 and later
    Backup in memory: inMemory constant: Saves the content of the Pivot Table control in memory. <Resultat> contains the backup result.
    New in version 21
    Backup in memory: inMemory constant: Saves the content of the Pivot Table control in memory. <Resultat> contains the backup result.
    Backup in memory: inMemory constant: Saves the content of the Pivot Table control in memory. <Resultat> contains the backup result.
  • Backup in a file: Name and full path of the file where the content of Pivot Table control will be saved.
<Password>: Optional character string (with quotes)
Password for the backup. If the backup is password protected, this password will have to be specified when the backup is loaded by <Pivot table>.Load.
Remarks

Saving and loading a Pivot Table control

When the content of a Pivot Table control is calculated with function <Pivot table>.CalculateAll, the result can be saved with function <Pivot table>.Save. Then, it can be reloaded by <Pivot table>.Load: in this case, the content of the Pivot Table control is not recalculated.
Component: wd270obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment