PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • Creating a Crosstab report based on a query
  • Note
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
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:
Note: 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" from the popup menu of 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, select "File .. New.. Report .. Crosstab". The wizard for report creation starts. To create a "Crosstab" report, click among the quick access buttons:
  • Click "Report" in the wheel that is displayed. The window for creating a new element is displayed: click "Report" then "Report".
  • The wizard for report creation starts. Select "Crosstab".
In this wizard, you must specify:
  • the item corresponding to the captions of the columns.
    Note: 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.
    Note: 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.
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).
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