ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Editors / Report editor / Types of reports
  • Overview
  • Creating a Gantt Chart report
  • Creating the report
  • Remarks
  • Testing a Gantt Chart report
  • Gantt Chart control in a report
  • Printing a Gantt Chart report
  • Example
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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 in the quick access buttons.
  2. The window for creating a new element is displayed: click "Report" then "Report".
  3. The report creation wizard 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. If necessary, indicate the calculations to be made on the different numeric items of your report. Select "No calculation" to continue without integrating calculations in the report. Go to the next step.
  8. Specify the format of sheet on which the report will be printed. The report is printed in A4 format by default. Go to the next step.
  9. If necessary, select the skin template of the report. Go to the next step.
  10. 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. You can also specify whether the report can be modified by the end user in "Reports & Queries".
  11. Validate the report creation.
  12. 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. For more details, see Multi-page print.
    • Use the landscape mode.
    • Reduce the report size. Please note: depending on the reduction percentage selected, the printed report may become illegible..
  13. The report currently created is displayed in the report editor.

Remarks

  • 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.

Testing 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).
    Internal windows: If the Gantt Chart control is present in an internal window, it is advisable to create the button 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 hosts the internal window.
Reports & Queries cannot be used to create Gantt Chart reports. However, it is possible to customize Gantt chart reports created in the built-in report editor (color, fonts, size, etc.).
Gantt Chart control in a report
A table is automatically created in a Gantt Chart report. This table contains a Gantt Chart control.
The Gantt Chart control description window allows you to configure the following characteristics:
  • Task display ("General" tab): you can 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.
  • 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 the 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.
  • Date display ("General" tab): The following options are available:
    • Show week number: If this option is checked, the week number is displayed in the Gantt chart.. You can define the display mask of the week number. By default, only the week number is displayed. You can specify a custom mask using %1 for the week number (for example: Week %1)..
    • Mask for 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.
    • Mask for schedules ("General tab").
      The mask is "Automatic" by default. You can use:
      • one of the preset masks.
      • a custom mask. For example, you can use the "HH" mask to hide minutes.
  • Diagram width division ("UI" tab): Use this option to set the diagram representation for printing.. You can select one of the following options:
    • Continuous Gantt chart (Default): The Gantt chart will be displayed continuously over several pages.. This option allows for linear printouts, without breaks.
    • Transfer columns to each page: Gantt chart "description" columns (title, duration, etc.) will be transferred to each page when the Gantt chart is printed..
  • Anchor on field ("UI" tab): with this option, a report field can follow the stretch of the Gantt Chart control field.. Indeed, the Gantt Chart control is stretched according to the printed data. The "Anchor on field" option is particularly useful if columns or fields are to be printed to the right of the Gantt Chart control: they will then follow the stretching of the Gantt Chart control.
  • Style of the different elements in the Gantt chart ("Style" tab).
Printing a Gantt Chart report
A Gantt Chart report (on a Table or TreeVeiw Table control) can only be printed from the window that displays the control. To do so:
  1. Create a button in the window containing the control.
  2. Set the report print destination with iDestination (report viewer, print in an HTML file, etc.).
  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.
  • If the window that contains the source control is opened multiple times (non-modal opening by OpenChild), the full name of the control to print 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_Gantt, TVT_Schedule.FullName)
    // Opening code of the report: 
    PROCEDURE RPT_Gantt(sNameSourceTVTable)
    MyReport.SourceName = NameSourceTreeViewTable
  • The SelectionOnly property is used to identify and modify the records to be printed in the report: print all records or only selected records.
  • If the report is based on a TreeView Table control, the KeepVisibleHierarchy property lets you define and modify the hierarchy print mode: printing of the complete hierarchy or printing of the hierarchy visible in the control.
In Reports & Queries software, you can print a report:
  • by starting a print job ().
  • by testing the report ().
Therefore, no programming is required to print the report.

Example

The information to print is 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 "BTN_Print" is clicked on.
In this example, the click code of "BTN_Print" is as follows:
// Open report viewer
iDestination(iViewer)
// Print the report based on the "TVT_Schedule" TreeView Table control 
iPrintReport(RPT_Gantt)
Related Examples:
WD Gantt Complete examples (WINDEV): WD Gantt
[ + ] The "WD Gantt" example presents an advanced use of the Gantt Chart control.
This example is used to create a Gantt chart with tasks, links, cumulative tasks and milestones.
The tasks can be edited in a specific window.
The created chart can be saved in a file and reloaded thereafter.
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help