ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Report editor / Types of reports
  • Overview
  • Creating a Crosstab report based on a query
  • Creating a Crosstab report based on a Pivot Table control
  • Features of the Pivot Table control (Report editor)
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
Overview
The report editor allows you to create "Crosstab" reports. In this case, the report contains a double-entry table only.
Example:
Data source of the Crosstab report: The Crosstab report can be based:
  • on one or more data files. In this case, an embedded query is used. This query is created via the wizard for creating a "Crosstab" report. For more details, see Creating a Crosstab report based on a query.
  • WINDEV a Pivot Table control. For more details, see Pivot Table report.
  • WINDEV no data source: this option allows you to specify the Pivot Table control to use at runtime only, via the SourceName property.
Remark: If the "Crosstab" report is based on a query, you have the ability to modify the embedded query in the query editor. To edit the embedded query in the query editor:
  1. Select "Description" in the context menu of the report. The description window of the report is displayed.
  2. Display the "Data" tab.
  3. Click the "Edit" button.
Creating a Crosstab report based on a query
To create a "Crosstab" report based on a query:
  1. Click in the quick access buttons:
  2. The new element window appears: click "Report" then "Report".
  3. The report creation wizard starts. Select "Crosstab".
  4. The wizard prompts you to select the data source of the report: choose "From one or more files".
In this wizard, you must specify:
  • the item corresponding to the captions of the columns.
    Remark: If this item is a "Date" item, the wizard proposes to:
    • keep the day, the month or the year only for these dates.
    • define the period to take into account (start date and end date).
  • the item corresponding to the captions of the rows.
    Remark: If this item is a "Date" item, the wizard proposes to:
    • keep the day, the month or the year only for these dates.
    • define the period to take into account (start date and end date).
  • the information that will be displayed in the table cells. This information can correspond to:
    • either the number of records corresponding to the intersection of rows and columns.
      For example: the number of products ordered per product and per year. The customer named "Smith" has placed 2 orders in 2000 and 3 orders in 2001.
    • the sum, the average, the maximum or the minimum of an item.
      For example: the number of products ordered per product and per year. In 2000, 279 sofas were ordered.
    • an item.
      For example: the score given by each judge to a skater in competition. At the 2000 European Championships, the Italian judge awarded 5.2 to skater "A".
  • the calculation of totals for the table rows and columns (if necessary).
  • the format of the page on which the report will be printed. The report is printed in A4 format by default.
  • the skin template of the report (if necessary).
  • the name and title of the report. This name (".WDE". file corresponding to the report) will be used to identify the report in your programs.
The new report contains a Table control to display the data.
Note: When printing a Crosstab report, if the report format does not allow to display all the table columns, the table is automatically resized according to the print format of the report (the font and columns are resized accordingly).
Creating a Crosstab report based on a Pivot Table control
To create a "Crosstab" report:
  1. Click in the quick access buttons.
  2. The new element window appears: click "Report" then "Report".
  3. The report creation wizard starts.
  4. In this wizard, specify:
    • the type of report to create: "Crosstab".
    • the Pivot Table control used as data source.
    • the skin template of the report (if necessary).
    • the name and title of the report. This name (".WDE". file corresponding to the report) will be used to identify the report in your programs.
The new report contains a Pivot Table control to display the data.

Features of the Pivot Table control (Report editor)

You can configure the following features of a Crosstab report containing a Pivot Table control:
  • The data source of the report can be modified in the "Data" tab of the description window of report ("Report description" in the context menu of the report).
  • The "General" tab of the Pivot Table control description window is used to specify:
    • the mode for calculating the width of cells: the available options are:
      • Use the width defined in edit mode: the width of the cells will be the same as the one defined in the report editor.
        Remark: The handles can be used to resize the data area in the Pivot Table control found in the report.
      • Fill the page as much as possible in width: the cells will be enlarged to fill the available space found in the page.
      • Avoid the truncated cells: the cells will be possibly enlarged to display the entire data if there is enough space in the page.
    • the expanding dimensions: the available options are:
      • Like the control: the level of details displayed in the report will be the same as the one displayed in the Pivot Table control used as data source.
      • All expanded: the entire data found in the Pivot Table will be displayed.
      • All collapsed: only the first detailed level of the Pivot Table will be displayed.
  • The "Style" tab in the description window of the PVT control is used to define the style of the control: the option "Define the style independently of the printed PVT control" is used to define a specific style for the control found in the report. If this option is checked, you have the ability to specify the style for the row headers and for the data.
Related Examples:
WD Reports Training (WINDEV): WD Reports
[ + ] This example presents the different methods for creating a report:

- prints based on different data sources (queries, variables, ...)
- prints based on controls (Table, Spreadsheet, PVT, ...)
- printing composite reports
- specific prints (portrait/landscape, report with watermark, report with bar code, ...)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help