PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Creating a report (via a wizard)
  • The different steps of the wizard
  • The different types of reports
  • The available data sources
  • Breaks and sorts
  • Performing calculations in a report
  • Skin template
  • Print format of the report
  • Saving a report
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
Creating a report
Overview
The report editor allows you to easily create all types of reports via a wizard.
The reports created with the report editor can be printed:
  • from WINDEV applications (Windows or Linux).
  • from WEBDEV sites (Windows or Linux).
  • from iOS applications.
  • from applications in Universal Windows App mode.
  • from Android applications.
Creating a report (via a wizard)
To create a report:
  1. Click New in the quick access buttons.
    • The new element window appears: click "Report" then "Report".
    • The report creation wizard starts.
  2. In the different steps of the wizard, specifiy:
  3. Validate the report creation. The report is generated and saved according to the selected options.
These different steps are completed in the report creation wizard. A report with to the selected options is automatically created at the end of the wizard. The created report appears in edit in the report editor. The different blocks and controls of your report have been created. They can be modified according to your own requirements. Most of the options chosen when creating the report can be modified thereafter.
Then, the report can be run:
  • from the report editor,
  • from a WINDEV application,
  • from a WINDEV Mobile application (for iOS or Android),
  • from a WEBDEV site.
The different steps of the wizard

The different types of reports

Several types of reports can be created in the report editor. All these types of reports are available in the user version of report editor and in the standard report editor.
The following types of reports are available:
  • Blank report.
  • Form report.
  • Table report.
  • Crosstab report.
  • TreeView Table report.
  • Gantt Chart report (not available in WINDEV Mobile).
  • Organizer report (not available in WINDEV Mobile).
  • Scheduler report (not available in WINDEV Mobile).
  • Spreadsheet report (not available WINDEV Mobile)..
  • Custom Mailing report (not available in WINDEV Mobile).
  • Label report.
  • Report based on a Form.
  • Multicolumn report.
  • Composite report (not available in Android).
For more details, see Types of reports.

The available data sources

The data source of report defines the origin of data printed in the report. Several data sources are available. These data sources can be selected in the report creation wizard or in the report description window.
The available data sources are as follows:
  • Existing data file: The data to print comes from a data file described in the project analysis. This data file can be in any format (HFSQL Classic, Oracle, etc.).

    Important

    The data files and the file items that can be used in the reports created with Reports & Queries are defined by the developer in the data model editor. For more details on the requirements to use a WINDEV application with Reports and Queries, see Distributing Reports & Queries.
  • Query: The data to print comes from a query. This query corresponds to:
    • a query that was previously created and saved in the query editor.
    • a new query that will be built when the report is created.
  • Table, TreeView Table, Organizer, Scheduler or Looper control in a window or page: The data to print comes from a specific control found in one of the application windows or in one of the site pages. The records are selected by the control and they are printed by the report.

    Important

    Reports & Queries cannot be used to create reports based on Table, TreeView Table, Organizer, Scheduler or Looper controls. However, you can customize reports based on these types of controls, if they were created in the standard report editor (color, font, size, linked column, etc.)
  • Existing variable : The data to print comes from a WLanguage variable found in the project or in the report. This variable can be a simple array, a class member, a structure member or an advanced variable member.

    Important

    Reports & Queries cannot be used to create or modify reports on variable.
  • No data source: The report will be linked to no data source.
  • Other available data sources
    • Text file: The data to print is read in a text file.
    • Memory area populated programmatically (not available in WINDEV Mobile): The data to print corresponds to the records stored in a memory area.

      Important

      Reports & Queries cannot be used to create reports on a memory area. However, you can customize reports based on a memory area, if they were created in the standard report editor (color, font, size, etc.).
    • HFSQL view: The data to be printed comes from an HFSQL view in an HFSQL Classic data file.

      Important

      Reports & Queries cannot be used to create reports on an HFSQL view. However, you can customize reports based on an HFSQL view, if they were created in the standard report editor (color, font, size, etc.).
    • Programmed reading of the data source: To manually program and select the records that will be displayed in the report, choose a report based on a programmed data source. For more details, see Report based on a programmed data source.

      Important

      Reports & Queries cannot be used to create reports on a programmed data source.
These data sources are presented in Data sources.
Remark: If one of the above-mentioned data sources is selected, the records that will be displayed in the report are automatically selected by the report editor.
To manually program and select the records that will be displayed in the report, choose a report with programmed reading of data source.

Breaks and sorts

The breaks and the sorts are used to define the sort order of data printed in the report as well as the options for grouping data.
  • If the report is based on a data file, the search items of data file are automatically proposed as sort items.
  • If the report is based on a query, the sorts performed in the query are automatically proposed for the breaks.
  • If the report is based on a variable, only the breaks can be defined: the sorts must be performed through programming.
The sort
To make the result of a query easier to read, the records can be sorted according to one or more items. Sorting the records means classifying them in an ascending order or in descending order.
For example, the customers can be sorted by name, from A to Z.
If your report is based on a query, the sort order is defined when creating the query. However, you can:
  • add or delete a sort item to/from an existing report.
  • modify the sort order performed on an item in an existing report.
To improve the sort, you also have the ability to use:
  • WLanguage functions (Left, Right, etc.).
  • a WLanguage procedure (server procedure in WEBDEV). This procedure will be automatically called to sort the records displayed in the report. This procedure must be a global procedure of project or a local procedure of report. For more details, see Sort procedure.
The breaks
The break is used to group the records corresponding to the same sort argument.
For example:
  • to list the stock price by day, all you have to do is sort the stocks by date and perform a break on the date.
  • to list the customers and the companies by city, sort the customers by city then by company name, and perform a break on the city.
    Report with breaks
Adding a break automatically generates the Start of break and End of break blocks. These blocks are used to:
  • display the content of the break item (usually in the Start of break block).
  • perform calculations on the records in the break (usually in the End of break block).
For more details, see Report blocks. The report editor proposes two types of breaks:
  • automatic break (the most common one). The break is performed on an item belonging to the data source of report.
  • programmed break. The break is defined programmatically in the "Value of break" event of the Start of break block. For more details, see Breaks in a report.
For more details on breaks, see Breaks in a report.

Performing calculations in a report

You can perform different calculations on the numeric data from the report. For example, in a report used to list the orders per customer, you can calculate and display the average value of the customer orders.
Remark: The different calculations performed in a report are defined when the report is created. However, new calculations can be added to the created report via the calculated controls.

Skin template

If the project is associated with a skin template (or with a template), this skin template (or this template) can be selected for your reports. Your printed reports and your application will have the same style. This skin template (or template) can be modified once the report is created.
Caution: Depending on the type of printer, the reports containing images may take quite a long time to print.

Print format of the report

The format of a report is used to configure:
  • the report orientation.
  • the paper format.
  • the print margins.
  • the number of columns in the report. By default, a report contains one column. If the report contains more than one column, the report is said to be "multi-column".
For a "Label" report, you also have the ability to configure:
  • the format of the label sheet.
  • the spacing between the labels.
This information can be modified after the report creation. For more details, see Describing and handling a report.

Saving a report

To save a report:
  • on the "Home" tab, in the "General" group, click "Save".
  • click Save in the quick access buttons.
The extension of the created report file is ".WDE".
The report is automatically included in the list of project elements.
If you are using the report editor, the reports will be included in the library:
  • WINDEV when creating the executable.
  • WEBDEV - Server code when deploying the site.
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, ...)
WM CRM Cross-platform examples (WINDEV Mobile): WM CRM
[ + ] WM CRM is a multi-platform project for Android and iOS.
It explains how to develop a CRM application intended to the Android and iPad tablets.
WM Expense Account Cross-platform examples (WINDEV Mobile): WM Expense Account
[ + ] This example allows you to manage your fees.

Let's see the main features of this application:
- The input of invoices
- Management of foreign currencies
- Inclusion of photo document for the invoices
- Ability to email the expense account
- Ability to track the expense accounts
- ...
WM Managing Contacts Cross-platform examples (WINDEV Mobile): WM Managing Contacts
[ + ] This example presents the management of contacts for Android et iOS.
It is used o:
- list the contacts found on the phone
- call the contacts
- send SMSs to the contacts
- ...
WM Managing Orders Cross-platform examples (WINDEV Mobile): WM Managing Orders
[ + ] The WM Managing Orders example is a simplified management of orders and invoices.
This example is used to:
- create/modify/delete a product,
- create/modify/delete a customer,
- contact a customer by email,
- see the history of the actions performed for a customer
- place an order, print an order form,
- invoice an order, print an invoice.
See also
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment