|
- How to create the Pivot Table control (in a window)?
- Wizard for creating a Pivot Table control
Creating a Pivot Table control
How to create the Pivot Table control (in a window)? To create a Pivot Table control in a window: - On the "Creation" pane, in the "Data" group, expand "Table and List Box" and select "Pivot Table (PVT)".
- Click where you want to create the control. The wizard for control creation starts. This wizard is used to define the main elements of the pivot table.
- At the end of the wizard, the Pivot Table control is automatically created with the Button control used ti fill it at runtime.
Remarks: - The Pivot Table control works:
- on the HFSQL databases,
Versions 20 and lateron other databases via arrays of structures. New in version 20on other databases via arrays of structures. on other databases via arrays of structures.
- The content of the Pivot Table control can be printed via its popup menu. See Printing the content of a Pivot Table control (AAF) for more details.
Versions 21 and laterYou can create a report based on a Pivot Table control. See Pivot Table report for more details. New in version 21You can create a report based on a Pivot Table control. See Pivot Table report for more details. You can create a report based on a Pivot Table control. See Pivot Table report for more details.
Wizard for creating a Pivot Table control The Pivot table control creation wizard is used to define the main elements of the table. - First, the wizard is used to define the values displayed in the cells of the pivot table. A cell found in a pivot table can display for example the total sales, the sum of quantities, the number of orders, ...
Therefore, you must define for each value displayed in the cell: - the source file. This file corresponds to the file containing the value used for the calculation. For example, the OrdLine file to calculate the sales performed.
- the calculation displayed. Several calculations are available: sum, mean, count, ...
- the source for the calculation, which means the item of the source file to use. For example, to calculate the sales performed, the sum will be performed on the sale price (Total_Row item of OrdLine file).
The "Add an additional value" button is used to define a new value that will be displayed in the cell. Remarks: - The Pivot Table control can be based on a query. In this case, the source file corresponds to the query.
Versions 20 and laterThe Pivot Table control can be based on an Array of Structures variable. In this case, the source file corresponds to the variable. New in version 20The Pivot Table control can be based on an Array of Structures variable. In this case, the source file corresponds to the variable. The Pivot Table control can be based on an Array of Structures variable. In this case, the source file corresponds to the variable.
- The next step consists in defining the column header of the Pivot Table control. The column header comes firectly from your data files.
One or more column headers can be found. For each column header, the header lets you define: - the link used to access the item displayed in the header. This link is performed from the data file used for the source of calculation.
- if the column header corresponds to a Date item, the wizard proposes the display mode of the date: Year, Half-year, Quarter, Month, Fortnight, Week, Day. A new grouping will be performed for each selected display mode. For example, if only years, quarters and months are displayed, the column header will be as follows: Remarks:
- If the Pivot Table control is based on a query, the data displayed in the column header comes directly from the query.
Versions 20 and laterIf the Pivot Table control is based on an Array of Structures variable, the data displayed in the column header comes from the members of the structure. New in version 20If the Pivot Table control is based on an Array of Structures variable, the data displayed in the column header comes from the members of the structure. If the Pivot Table control is based on an Array of Structures variable, the data displayed in the column header comes from the members of the structure.
- The next step consists in defining the row header of the Pivot Table control. The row header comes from your data files.
One or more row headers can be found. For each row header, the wizard lets you define: - the link used to access the item displayed in the header. This link is performed from the data file used for the source of calculation.
- if the row header corresponds to a Date item, the wizard proposes the display mode of the date: Year, Half-year, Quarter, Month, Fortnight, Week, Day. A new grouping will be performed for each selected display mode.
Remarks: - If the Pivot Table control is based on a query, the data displayed in the row header comes directly from the query.
Versions 20 and laterIf the Pivot Table control is based on an Array of Structures variable, the data displayed in the row header comes from the members of the structure. New in version 20If the Pivot Table control is based on an Array of Structures variable, the data displayed in the row header comes from the members of the structure. If the Pivot Table control is based on an Array of Structures variable, the data displayed in the row header comes from the members of the structure.
- Give a name to the Pivot Table control and validate.
Versions 20 and laterRemark: The dimensions of the control are optimized to take up the available space at the specified position. If the control size does not suit you, press Ctrl + Z: the control size will be reset to default. New in version 20Remark: The dimensions of the control are optimized to take up the available space at the specified position. If the control size does not suit you, press Ctrl + Z: the control size will be reset to default. Remark: The dimensions of the control are optimized to take up the available space at the specified position. If the control size does not suit you, press Ctrl + Z: the control size will be reset to default.
The Pivot Table control is created in the window with a "Calculate" Button control. This Button control is used to start the calculation of the Pivot Table control. Caution: If the source of the Pivot Table control is: - a query, the query must be run before calculating the Pivot Table control.
Versions 20 and lateran array of structures, the array of structures must be filled before calculating the Pivot Table control. New in version 20an array of structures, the array of structures must be filled before calculating the Pivot Table control. an array of structures, the array of structures must be filled before calculating the Pivot Table control.
To modify the characteristics of the Pivot table control, display the control description ("Description" from the popup menu). See Describing a Pivot Table control for more details.
Related Examples:
|
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.
|
|
|
|
| |
| Click [Add] to post a comment |
|
| |
|
| |
| |
| |
| |
| |
| |
| | |
| |