PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Creating a Gantt Chart report
  • Creating the report
  • Notes
  • Running the test of a Gantt Chart report
  • Gantt Chart control in a report
  • Printing a Gantt Chart report
  • Example
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 gives you the ability to create "Gantt Chart" reports. This type of report is based on a Table or TreeView Table control that displays a Gantt Chart column.
Example:
Creating a Gantt Chart report

Creating the report

To create a "Gantt Chart" report:
  1. Click among the quick access buttons.
  2. Click "Report" in the wheel that is displayed. The window for creating a new element is displayed: click "Report" then "Report".
  3. The wizard for report creation starts.
  4. Select a "Gantt Chart " report. Go to the next step.
  5. Select the Table or TreeView Table control that will be used to create the Gantt Chart report. Specify whether only the rows selected in the controls must be printed. Go to the next step.
  6. Specify the items to print (which means the columns of the Table or Treeview Table control). For each item, you have the ability to specify the caption of the item and the block where the item must be positioned. Go to the next step.
  7. Specify the format of the sheet on which the report will be printed. The report is printed in A4 format by default. Go to the next step.
  8. Type the name and title of report (name of ".WDE" file corresponding to the report). This name will be used to identify the report in your programs. You also have the ability to specify whether the report can be modified by the end user in "Reports & Queries".
  9. Validate the report creation.
  10. 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. This type of print is recommended for a Gantt Chart report. See Multi-page print for more details.
    • Use the landscape mode.
    • Reduce the report size. Caution: according to the reduction percentage, the printed report may become unreadable.
  11. The report currently created is displayed in the report editor.

Notes

  • The parameters regarding the style of the tasks found in the Gantt Chart of the report are automatically retrieved from the control (background color, progress color, ...).
  • A Table report is automatically created from the Table or TreeView Table control. The Gantt Chart column found in the window is changed in the report editor into a Gantt Chart column.

Running the test of a Gantt Chart report

The test of a Gantt Chart report cannot be run from the report editor because the window containing the Table or TreeView Table control must be opened. To run the test of a Gantt Chart report, you must:
  • create (if necessary) a button in the window containing the Gantt Chart control. This button is used to print the Gantt Chart report (iPrintReport).
    Case of internal windows: If the Gantt Chart 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 Gantt Chart 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.

Important

Reports & Queries cannot be used to create Gantt Chart reports. However, you have the ability to customize the Gantt Chart reports created in the standard report editor (color, fonts, size, ...).
Gantt Chart control in a report
A table is automatically created in a Gantt Chart report. This table contains a Gantt Chart control.
The description window of Gantt Chart control is used to configure the following characteristics:
  • Display mode of tasks ("General" tab): you have the ability to select:
    • the range for task selection (from the first one to the last one or on a specific number of days).
    • the number of days displayed.
    • the granularity of gridlines.
    • the visible time period.
  • Versions 20 and later
    The custom report to display the tasks.
    • If the selected option is "None", the default display is used.
    • If "Preset report" is selected, a preset report is automatically added to the project. This report is named "RPT_WinDevViewGanttTask" by default and it is automatically used to display tasks.
      This report can be customized, renamed, ...
    • If the selected option corresponds to a report of the project, this report will be used to display the tasks.
      We advise you to customize the report proposed by default.
    New in version 20
    The custom report to display the tasks.
    • If the selected option is "None", the default display is used.
    • If "Preset report" is selected, a preset report is automatically added to the project. This report is named "RPT_WinDevViewGanttTask" by default and it is automatically used to display tasks.
      This report can be customized, renamed, ...
    • If the selected option corresponds to a report of the project, this report will be used to display the tasks.
      We advise you to customize the report proposed by default.
    The custom report to display the tasks.
    • If the selected option is "None", the default display is used.
    • If "Preset report" is selected, a preset report is automatically added to the project. This report is named "RPT_WinDevViewGanttTask" by default and it is automatically used to display tasks.
      This report can be customized, renamed, ...
    • If the selected option corresponds to a report of the project, this report will be used to display the tasks.
      We advise you to customize the report proposed by default.
  • Mask of dates ("General" tab).
    The mask is "Automatic" by default. You can use:
    • one of the preset masks.
    • a custom mask. For example, the "MMMM YYYY||" mask allows you not to display the days.
  • Anchor on control ("GUI" tab): via this option, a report control and the Gantt Chart control can be stretched accordingly. Indeed, the Gantt Chart control is stretched according to the printed data. The "Anchor on control" option is useful when columns or controls must be printed on the right of the Gantt Chart control: they will be stretched like the Gantt Chart control.
  • Style of different elements found in the Gantt chart ("Style" tab).
Printing a Gantt Chart report
A Gantt Chart report (on a Table or TreeVeiw Table control) must be printed from the window displaying the control to print. To do so, you must:
  1. Create a button in the window containing the control.
  2. Configure the destination of report print with iPreview (print preview, print in an HTML file, ...).
  3. Specify the name of report to print with iPrintReport.
Notes:
  • If additional parameters must be passed to the report, these parameters must be specified in iPrintReport, after the name of report to print. See Report with parameters for more details.
  • If the window containing the source control of report is opened several times (non-modal opening by OpenChild), the full name of control to print must be passed in parameter to the report.
    For example:
    // The ..FullName property will contain the window name// that must be opened with an alias to distinguish between each windowiPrintReport(RPT_Gantt, TVT_Schedule..FullName)
    // Opening code of report:
    PROCÉDURE RPT_Gantt(sNameSourceTVTable)
    MyReport..SourceName = NameSourceTVTable
  • ..SelectionOnly is used to find out and modify the records that will be printed in the report: printing all records or the selected records only.
  • If the report is based on a TreeView Table control, ..KeepVisibleHierarchy is used to find out and modify the print mode of hierarchy: printing the entire hierarchy or printing the hierarchy that is visible in the control.

Important

In Reports & Queries, you can print a report:
  • by starting a print ( ).
  • by running the report test ( ).
Therefore, no programming is required to print the report.

Example

The information to print is contained in the TreeView Table control named "TVT_Schedule" found in the "WIN_Gantt" window.
The report to print is named "RPT_Gantt" and it is printed when clicking the "BTN_Print" button.
In this example, the click code of "BTN_Print" button is as follows:
// Open the preview window
iPreview()
// Print the report based on the "TVT_Schedule" TreeView Table control
iPrintReport(RPT_Gantt)
Minimum required version
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment