Highlighted
Absent Member.
Absent Member.
822 views

[archive] How to display a Gantt chart

[Migrated content. Thread originally posted on 14 March 2006]

Anybody got any bright idea what controls I could use to create the equivalent of a horizontal Gantt chart that can be scrolled horizontally and vertically?

Preferably the 'bars' in the chart would be different colours and have a number displayed on them.

Any suggestions would be appreciated.
0 Likes
8 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] How to display a Gantt chart

Well, depends on what you want to use. Have you looked at the MS Chart control that ships with ACUCOBOL-GT?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] How to display a Gantt chart

We have looked into using a Gantt control in the past and our favorite for our needs was PhGantTimePackage from plexityhide. (http://plexityhide.com) We haven't integrated this into our product, but we did spend some time working with it and creating samples. It's fairly inexpensive and may fit your needs...

Good Luck!

Rob
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] How to display a Gantt chart

Sorry guys, I should have been more explicit.

I don't want to use ActiveX controls, I just want to use AcuCobol controls.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] How to display a Gantt chart

Actually, I just spoke to the boss and for this project we might consider ActiveX.

Robstan, was the GTP control easy to integrate into Acucobol? Do you have any code examples that you would be willing to share?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] How to display a Gantt chart

Hi ,

Actually, we try to use an activeX called "ActiveGantt" by Source Code Store (http://www.sourcecodestore.com).

It's a really complete tool but it's not that simple to use.

It needs practicing. It's an evaluation version (cost on website).

Give me your feeling about it.

GUIRPS
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] How to display a Gantt chart

Duncan,

Sorry for the delay. Here is a simple program that I wrote a while back. Hopefully it will help.

Rob
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] How to display a Gantt chart

We have looked into using a Gantt control in the past and our favorite for our needs was PhGantTimePackage from plexityhide. (http://plexityhide.com) We haven't integrated this into our product, but we did spend some time working with it and creating samples. It's fairly inexpensive and may fit your needs...

Good Luck!

Rob


Rob,
If you have time, can you dig out one of your test programs and email it to me. I am evaluating this software myself an cannot seem to get to square one which is putting it on the screen section and displaying the screen. I get "8202 Error creating active X control.". Perhaps I could look at your code and pull out some syntax. My email is patty@icsnews.com

Here is my code in the screen section
01 TREE-1 lphGANTX3
LINE 5 COL 3
EVENT PROCEDURE TR010-TREE-EVENTS.

Thanks
Pattyj
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] How to display a Gantt chart

Patty,

Here is the sample program I had - it didn't use a screen section, but DISPLAY logic instead. It should work either way, though. I had a problem getting this to work and needed to get a runtime patch (many years ago), so if you're running an older version of AcuCOBOL, that could be the problem as well.

Good Luck!

Rob

       identification division.
       program-id.  PHGANT.
       environment division.
       configuration section.
       SPECIAL-NAMES.
           COPY "phgant.def".
                              .
       data division.
       working-storage section.

      * Copybooks

       copy "acucobol.def".
       copy "acugui.def".
       copy "crtvars.def".
       copy "controls.def".
       copy "opensave.def".

       77  window-0                          handle of window.
       77  alpha-accept                      pic x(1).

       01 GANT-HANDLES.
           05 GANT-MAIN-HANDLE       HANDLE OF @IPHGANTX3.
           05 GANT-TREE-ITEM-HANDLE  HANDLE OF @IPHDATAENTITY_TREE.
           05 GANT-TREE-ITEM2-HANDLE HANDLE OF @IPHDATAENTITY_TREE.
           05 GANT-TIME-HANDLE       HANDLE OF @IPHDATAENTITY_GANTTIME.

       procedure division.
       main-logic.
      *
           display standard graphical window,
                   title "Simple Program",
                   size 80, lines 27, background-low
                   modeless, link to thread,
                   handle window-0.
      *
       DISPLAY-GANTT-SAMPLE.
           DISPLAY @PHGANTX LINE 1
               COLUMN 5
               LINES 22
               SIZE 60
               EVENT PROCEDURE IS GANTT-EVENT-PROCEDURE
               HANDLE IN GANT-MAIN-HANDLE.
     
      * load the initial items
      * The Blue One
           MODIFY GANT-MAIN-HANDLE @ADDROOTDATAENTITYTREE()
             GIVING GANT-TREE-ITEM-HANDLE.
           MODIFY GANT-TREE-ITEM-HANDLE @CANEDIT = 1
                                        @TEXT = "Blue"
                                        @USERVARIANTREFERENCE = "Blue".
      * First Time
           MODIFY GANT-MAIN-HANDLE
             @ADDGANTTIME(GANT-TREE-ITEM-HANDLE, 0)
             GIVING GANT-TIME-HANDLE.
           MODIFY GANT-TIME-HANDLE @CANEDIT = 1
                                   @START = "01/14/04"
                                   @STOP = "01/16/04"
                                   @USERVARIANTREFERENCE = "Blue"
                                   @COLOR = X#8B0000.
           DESTROY GANT-TIME-HANDLE.
      * Second Time
           MODIFY GANT-MAIN-HANDLE
             @ADDGANTTIME(GANT-TREE-ITEM-HANDLE, 0)
             GIVING GANT-TIME-HANDLE.
           MODIFY GANT-TIME-HANDLE @CANEDIT = 1
                                   @START = "01/31/04"
                                   @STOP = "02/16/04"
                                   @USERVARIANTREFERENCE = "Blue"
                                   @COLOR = X#8B0000.
           DESTROY GANT-TIME-HANDLE.
      * Add a subnode
           MODIFY GANT-MAIN-HANDLE
             @ADDDATAENTITYTREE(GANT-TREE-ITEM-HANDLE)
             GIVING GANT-TREE-ITEM2-HANDLE.
           MODIFY GANT-TREE-ITEM2-HANDLE @CANEDIT = 1
                                         @TEXT = "SubNode"
                                         @USERVARIANTREFERENCE = "White".
      * Subnode Time
           MODIFY GANT-MAIN-HANDLE
             @ADDGANTTIME(GANT-TREE-ITEM2-HANDLE, 0)
             GIVING GANT-TIME-HANDLE.
           MODIFY GANT-TIME-HANDLE @CANEDIT = 1
                                   @START = "01/12/04"
                                   @STOP = "01/14/04"
                                   @USERVARIANTREFERENCE = "White".
           DESTROY GANT-TIME-HANDLE.
           DESTROY GANT-TREE-ITEM-HANDLE.
           DESTROY GANT-TREE-ITEM2-HANDLE.
     
      * The Orange One
           MODIFY GANT-MAIN-HANDLE @ADDROOTDATAENTITYTREE()
             GIVING GANT-TREE-ITEM-HANDLE.
           MODIFY GANT-TREE-ITEM-HANDLE @CANEDIT = 1
                                        @TEXT = "Orange"
                                        @USERVARIANTREFERENCE = "Org".
      * First Time
           MODIFY GANT-MAIN-HANDLE
             @ADDGANTTIME(GANT-TREE-ITEM-HANDLE, 0)
             GIVING GANT-TIME-HANDLE.
           MODIFY GANT-TIME-HANDLE @CANEDIT = 1
                                   @START = "01/18/04"
                                   @STOP = "01/25/04"
                                   @USERVARIANTREFERENCE = "Orange"
                                   @COLOR = X#008CFF.
           DESTROY GANT-TIME-HANDLE.
      * Second Time
           MODIFY GANT-MAIN-HANDLE
             @ADDGANTTIME(GANT-TREE-ITEM-HANDLE, 0)
             GIVING GANT-TIME-HANDLE.
           MODIFY GANT-TIME-HANDLE @CANEDIT = 1
                                   @START = "01/28/04"
                                   @STOP = "01/31/04"
                                   @USERVARIANTREFERENCE = "Orange"
                                   @COLOR = X#008CFF.
           DESTROY GANT-TIME-HANDLE.
           DESTROY GANT-TREE-ITEM-HANDLE.
     
           ACCEPT GANT-MAIN-HANDLE.
           DESTROY GANT-MAIN-HANDLE.
     
       GANTT-EVENT-PROCEDURE SECTION.
           EVALUATE EVENT-TYPE
             WHEN MSG-AX-EVENT
               EVALUATE EVENT-DATA-2
                 WHEN PhGantXOnValueChangedGantTime
                   CONTINUE
                 WHEN PhGantXOnSelectionChangedGantTime
                   CONTINUE
               END-EVALUATE
           END-EVALUATE.
     
      **    *** Last Line Of PHGANT.CO  ***
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.