AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Tabla dinámica
  • Saving and loading a Pivot Table control
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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 PVTLoad.
Ejemplo
sFile is string
// Builds the file name
sFile = SysDir(srAppData) + ["\"] + "StatsByCountry.tcd"

// The file exists?
IF fFileExist(sFile) THEN
	// Yes, load it 
	PVTLoad(PVT_Statistics, sFile)
	IF YesNo("Do you want to recalculate everything?") THEN PVTCalculateAll(PVT_Statistics)
ELSE
	// The file does not exist, calculate it
	PVTCalculateAll(PVT_Statistics)
END
PVTSave(PVT_Statistics, sFile)
Sintaxis

Saving a Pivot Table control with its interface and a password Ocultar los detalles

<Result> = PVTSave(<Pivot Table control> , <Backup media> [, <Backup mode> [, <Password>]])
<Result>: Type depending on the backup media
  • Memory backup: Buffer containing the backup. Then, this backup can be saved in a file (fSaveBuffer), ...
  • Backup in a file:
    • True if the backup was performed,
    • False otherwise.
<Pivot Table control>: Control name
Name of the Pivot Table control to be used.
<Backup media>: Character string or constant
  • Save to memory: constant inMemory Save the contents of the Pivot Table control in memory. <Resultat> contains the backup result.
  • Save to file: Name and full path of the file to which the contents of the 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:
tcdWithUISaves the configuration of Pivot Table control:
  • size of columns,
  • size of rows,
  • collapsed/expanded row headers or column headers.
Note: Prior to version 25, this constant was called tcdAveHM.
If <Backup mode> and <Password> are not specified, only the 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 string or Secret string
Backup password. If the backup is password protected, this password will have to be specified when the backup is loaded by PVTLoad.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "ANSI o Unicode string".
Para obtener más información sobre las cadenas secretas y el almacén, consulte Almacén de cadenas secretas.

Saving a Pivot Table control without its interface and with a password Ocultar los detalles

<Result> = PVTSave(<Pivot Table control> , <Backup media> [, <Password>])
<Result>: Type depending on the backup media
  • Memory backup: Buffer containing the backup. Then, this backup can be saved in a file (fSaveBuffer), ...
  • Backup in a file:
    • True if the backup was performed,
    • False otherwise.
<Pivot Table control>: Control name
Name of the Pivot Table control to be used.
<Backup media>: Character string or constant
  • Save to memory: constant inMemory Save the contents of the Pivot Table control in memory. <Resultat> contains the backup result.
  • Save to file: Name and full path of the file to which the contents of the Pivot Table control will be saved.
<Password>: Optional string or Secret string
Backup password. If the backup is password protected, this password will have to be specified when the backup is loaded by PVTLoad.
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "ANSI o Unicode string".
Para obtener más información sobre las cadenas secretas y el almacén, consulte Almacén de cadenas secretas.
Observaciones

Saving and loading a Pivot Table control

When the content of a Pivot Table control is calculated with PVTCalculateAll, the result can be saved with PVTSave. It can then be reloaded using function PVTLoad: in this case, the contents of the Pivot Table control field are not recalculated.
Clasificación Lógica de negocio / UI: Código UI
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 18
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 16/05/2025

Señalar un error o enviar una sugerencia | Ayuda local