PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Creating a Gantt Chart report
  • Creating the report
  • Remarks
  • 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 in the quick access buttons.
  2. The element creation window appears: 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. Caution: according to the reduction percentage, the printed report may become unreadable.
  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.

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 Gantt Chart control description window allows you to configure the following characteristics:
  • Task display options ("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.
  • 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 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.
  • Versions 26 and later
    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.
    New in version 26
    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.
    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.
  • Versions 26 and later
    Chart split mode ("UI" tab): This option allows you to configure how the chart will be presented when printed. You can select one of the following options:
    • Continuous Gantt chart (default): The Gantt chart will be printed continuously on multiple pages. This option allows for linear printouts, without breaks.
    • Columns on each page: The "description" columns of the Gantt chart (Title, duration, etc.) will appear on each page.
    New in version 26
    Chart split mode ("UI" tab): This option allows you to configure how the chart will be presented when printed. You can select one of the following options:
    • Continuous Gantt chart (default): The Gantt chart will be printed continuously on multiple pages. This option allows for linear printouts, without breaks.
    • Columns on each page: The "description" columns of the Gantt chart (Title, duration, etc.) will appear on each page.
    Chart split mode ("UI" tab): This option allows you to configure how the chart will be presented when printed. You can select one of the following options:
    • Continuous Gantt chart (default): The Gantt chart will be printed continuously on multiple pages. This option allows for linear printouts, without breaks.
    • Columns on each page: The "description" columns of the Gantt chart (Title, duration, etc.) will appear on each page.
  • Anchor on control ("UI" 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 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. Configure the destination of the report print 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 = NameSourceTVTable
  • The SelectionOnly property is used to get and change 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, the KeepVisibleHierarchy property can be used to get and change the tree structure print mode: 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 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)
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment