PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Implementation
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
Enables or disables a filter on a Pivot Table control.
Caution: Only a filter defined in the "Content" tab of the description window of Pivot Table control can be used. Indeed, in this case, the initial calculation of the values found in the pivot table takes the filter into account. When PVTFilter is used, only the display of pivot table is modified.
Example
// -- Selecting a row of COMBO_Filter_by_family
// Filters the pivot table on the family of products that must be taken into account
PVTFilter(PVT_Statistics, COL_Caption, MySelf)

IF PVT_Statistics..Occurrence = 0 THEN
STC_NO_DATA..Visible = True
ELSE
STC_NO_DATA..Visible = False
END
Syntax
PVTFilter(<Pivot Table Control> , <Display Filter> , <Value>)
<Pivot Table Control>: Control name
Name of Pivot Table control to use.
<Display Filter>: Character string (with or without quotes)
Name of display filter to use. This filter was defined in the "Content" tab of the description window of Pivot Table control.
<Value>: Type corresponding to the filter
  • Value of filter to implement.
  • Empty string ("") to delete the filter.
Remarks

Implementation

To implement a filter in a pivot table, you must:
  1. Create the Pivot Table control.
  2. In the description window of Pivot Table control, in the "Content" tab, add one or more display filters.
  3. Create a control allowing the user to select the value of filter. The selection of value will run PVTFilter.
Example:
A pivot table is defined to display the sale statistics:
Pivot table for sales statistics
A filter is defined on the caption of family of products. The filter by family is used to only take into account the family specified in the calculation of turnovers.
Definition of filter
The window proposes a combo box allowing the user to choose the family of products to filter:
Choosing the family of products
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
Exemplo Pivo Filtro
_ano is int=0
Input("Ano:[",_ano)

PVTFilter(TCD_cliente_vencimento,COL_Dup_data_vencimento_Année,_ano)
PVTExpandAll(TCD_cliente_vencimento)

//Blog com video e exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/04/curso-windev-pivo-pvt-008-pivo-filter.html
De matos AMARILDO
Apr. 16 2016