ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Report editor / Data sources
  • Overview
  • Characteristics of the report based on a Scheduler control
  • Creating a report based on a Scheduler control from the report editor
  • Creating a report based on a Scheduler control from the report editor
  • Printing a report based on a Scheduler control
  • Principle
  • WINDEV example
  • WEBDEV example
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
Report based on a Scheduler control
Overview
You can create a report based on the data from a Scheduler control. This control can be in:
  • in a window or page of the application. This window or page must be displayed when printing the report.
  • in an internal window or an internal page:
    • The window displaying the internal window must be displayed.
    • The page displaying the internal page must be displayed.
Remark: Only a Scheduler report can be created on a Scheduler control.
Characteristics of the report based on a Scheduler control
Each row and each column found in the Scheduler control are displayed in the Scheduler report.
When creating the report, you can specify the number of days to display and the display mode of resources (in rows or columns).
A report based on a Scheduler control can be created from the report editor: to do so, select a Scheduler report based on a Scheduler control.
Once the report based on the Scheduler control is created, you can:
  • change the data source of the report ("Data" tab in the report description).
  • modify the characteristics of the schedule ("General" tab of the schedule description).
Caution: The test of a report based on a Scheduler control cannot be run from the report editor because the window or the page containing the Scheduler control must be opened. To run the test of a report based on a Scheduler control, you must:
  • create a button in the window or page of the Scheduler control. This button can be used to print the report with the data from the Scheduler control (iPrintReport).
    Case of internal windows: If the Scheduler control is found in an internal window, the button should be created in the internal window (and not in the host window).
  • run the test of the window containing the Scheduler control then run the report test (via the button).
    Case of internal windows: the test must be run from the window that is hosting the internal window.
  • run the test of the page containing the Scheduler control then run the test of the report (via the button).
    Case of internal pages: the test must be run from the page that hosts the internal page.
Reports & Queries cannot be used to create reports on a Scheduler control. However, you have the ability to customize the reports on a Scheduler control created in the standard report editor (color, fonts, size, ...).
Creating a report based on a Scheduler control from the report editor
The report editor allows you to create a Scheduler on a Scheduler control.
Once the report is created, the print must be programmed in WLanguage. For more details, see Printing a report based on a Scheduler control.

Creating a report based on a Scheduler control from the report editor

To create a report based on a Scheduler control from the report editor:
  1. Click in the quick access buttons.
    • The new element window appears: click "Report" then "Report".
    • The report creation wizard starts.
  2. Choose an "Organizer or Scheduler" report.
  3. Select "Scheduler report" and enter the characteristics of the report:
    • Number of days to display,
    • Granularity of gridlines,
    • Resource display mode.
      For more details on these options, see Scheduler report.
  4. Select the data source of report ("From a Scheduler control").
  5. Select the Scheduler control on which the report will be based. Only the Scheduler controls found in the windows or pages of the current project are proposed.
    Remark: If the selected control and the report do not have the same characteristics, the report editor proposes to modify the display of the report.
  6. Specify the format of sheet on which the report will be printed. The report is printed in A4 format by default.
  7. Type the name and title of the report (name of ".WDE" file corresponding to the report). This name will be used to identify the report in your programs.
    WINDEV You can also specify whether the report can be modified by the end user in "Reports & Queries".
  8. Validate the report creation.
  9. Specify (if necessary) the mode for reducing the report size:
    • Print the report on several pages. In this case, the end user will have to group the pages. For more details, see Multi-page print.
    • Use the landscape mode.
    • Reduce the report size. Caution: according to the reduction percentage, the printed report may become unreadable.
  10. The report currently created is displayed in the report editor.
Printing a report based on a Scheduler control

Principle

A report based on a Scheduler control must be printed from the window or page displaying the Scheduler control to print. To do so:
  1. Create a button in the window (or page) containing the Scheduler control.
  2. Configure the report print destination:
  3. Specify the name of the report to print with iPrintReport.
Remarks:
  • If additional parameters must be passed to the report, these parameters must be specified in iPrintReport, after the name of the report to print. For more details, see Report with parameters.
  • WINDEV If the window that contains the source Scheduler control is opened multiple times (non-modal opening with OpenChild), the full name of the Scheduler control to be printed must be passed as parameter to the report. For example:
    // The FullName property will contain the name of the window
    // that must be opened with an alias to distinguish between each window
    iPrintReport(RPT_Customer_Schedule, SCH_Customer.FullName)
    // Opening code of the report:
    PROCEDURE RPT_Customer_Schedule(NameSourceSchedule)
    MyReport.SourceName = NameSourceSchedule
In Reports & Queries, you can print a report:
  • by starting a print job ().
  • by testing the report ().
Therefore, no programming is required to print the report.
WINDEVReports and Queries

WINDEV example

The information to print is in the Scheduler control named "SCH_CustomerSchedule" found in the "WIN_Customer" window.
The report to print is named "RPT_CustomerSchedule" and it is printed during a click on the "BTN_Print" button.
In this example, the click code of "BTN_Print" button is as follows:
// Open report viewer
iDestination(iViewer)
// Print the report based on "SCH_CustomerSchedule"
iPrintReport(RPT_CustomerSchedule)
WEBDEV - Server code

WEBDEV example

The information to print is in the Scheduler control named "SCH_CustomerSchedule" found in the "PAGE_Customer" page.
The report to print is named "RPT_CustomerSchedule" and it is displayed in a PDF file when "BTN_Print" is clicked on.
In this example, the click code of "BTN_Print" is as follows:
// Generates a unique file name
UniqueFileName is string = fWebDir() + "\" + "RPT_CustomerSchedule_" + DateSys() + TimeSys() + ".pdf"
// Configures the print destination
iDestination(iPDF, UniqueFileName)
// Prints the report based on SCH_CustomerSchedule
iPrintReport(RPT_CustomerSchedule)
// Displays the report in PDF format
FileDisplay(UniqueFileName, "application/pdf")
// Deletes the file
fDelete(UniqueFileName)
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/30/2023

Send a report | Local help