UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Displaying Gantt Chart On A Form, Access 2016    
 
   
hemant
post Apr 1 2020, 04:30 AM
Post#1



Posts: 79
Joined: 19-February 20
From: Mumbai, India


Any suggestions for displaying a Gantt chart on a form.

I have thought of a few options - but not sure how to do it using VBA or whether it is possible.

Table: has fields PlanStDt, PlanEndDt, ActualStDt, PercentCompl, ActualEndDt, apart from some other fields.
I have a continuous form which displays the list of all activities for a particular project.

Option 1: On a Continuous form: Display a rectangle(Box) control. Calculate its Left, Top and Width properties based on the record's fields.
Is it possible to control the POSITION of a Box Control for each record on a Continuous form?

Option 2: On a Continuous Form: Display a Clustered Bar chart to draw two bars - one for Plan dates and other for Actual Date and % Completion.
Is this possible? This will be useful only if I can set the min X axis value(starting value). Only then the bars will display in appropriate date positions.

Option 3(my preferred choice but looks to be most complicated):
I know how to manually prepare a Gantt chart in Excel using combination of Stacked Bar chart, Error Bars and Scatter chart - basically a Combo Chart. Something like attached.
Is it possible to get it done on Access Form using VBA? If yes, then is there anywhere I can find reading material to do so. I tried finding it, but couldn't get one.

OR IF you have any suggestions?

Attached File(s)
Attached File  GanttChart.jpg ( 39.35K )Number of downloads: 12
 
Go to the top of the page
 
BentBrain
post Apr 1 2020, 05:48 AM
Post#2



Posts: 563
Joined: 10-February 03
From: Thailand


Hi Hemant

sorry please see Daniel Links.

BB
This post has been edited by BentBrain: Apr 1 2020, 06:41 AM

--------------------
"There is no excellent beauty that hath not some strangeness in the proportion" Francis Bacon
Go to the top of the page
 
DanielPineault
post Apr 1 2020, 06:03 AM
Post#3


UtterAccess VIP
Posts: 7,335
Joined: 30-June 11



@BB your links are no longer valid, no content.

--------------------
Daniel Pineault (2010-2019 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
DanielPineault
post Apr 1 2020, 06:08 AM
Post#4


UtterAccess VIP
Posts: 7,335
Joined: 30-June 11



You could use a library such as

https://jsganttimproved.github.io/jsgantt-improved/
https://github.com/taitems/jQuery.Gantt
https://github.com/thegrubbsian/jquery.ganttView
https://github.com/robicch/jQueryGantt


and use a webbrowser control to display it all.

--------------------
Daniel Pineault (2010-2019 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
JeffK
post Apr 1 2020, 07:30 AM
Post#5


UtterAccess VIP
Posts: 1,613
Joined: 19-December 02
From: Lansing, MI


Daniel, those are beautiful! I'm thinking about revising mine now smile.gif

I have a simple old Gantt chart built just with Access controls. See image. FYI it doesn't work to adjust widths of rectangles on a continuous form because VBA property changes will apply to all records. The bars in the image I have here come from using an expression in a textbox. The full expression is:

=IIf(IsNull([DateAssigned]) Or IsNull([TargetDate]),"",IIf([DateAssigned]<[GridStartDate],"",String(CLng(DateDiff("d",[GridStartDate],[DateAssigned])*([txtChart].[Width]/DateDiff("d",[GridStartDate],[GridEndDate]))*19/1440)," ")) & IIf([DateAssigned]>[TargetDate] Or [TargetDate]<[GridStartDate],"←",String(CLng(IIf([DateAssigned]>[GridStartDate],DateDiff("d",[DateAssigned],[TargetDate]),DateDiff("d",[GridStartDate],[TargetDate]))*([txtChart].[Width]/DateDiff("d",[GridStartDate],[GridEndDate]))*19/1440*[PercentComplete]/100),ChrW(9608))))

The important part is the ChrW(9608), which results in a solid block character. String them together with the String() function. The rest just calculates how many of them to display, based on a percentage of the time duration fields inside a date range. That and some null checks.

Attached File(s)
Attached File  Gantt.jpg ( 320.73K )Number of downloads: 16
 
Go to the top of the page
 
Peter Hibbs
post Apr 1 2020, 10:42 AM
Post#6


UtterAccess VIP
Posts: 1,798
Joined: 17-June 10
From: Dorset. UK.


Hi hemant,

Maybe this Gantt Demo will give you some ideas.

Peter Hibbs.
Go to the top of the page
 
hemant
post Apr 1 2020, 11:03 AM
Post#7



Posts: 79
Joined: 19-February 20
From: Mumbai, India


Thank you all. I am going to study your suggestions. Highly appreciated.
Go to the top of the page
 
hemant
post May 13 2020, 12:31 PM
Post#8



Posts: 79
Joined: 19-February 20
From: Mumbai, India


@Peter, After the last interaction, my focus was diverted to another project. Hence, did not see the demo file sent by you. But I saw it today. And I can't thank you enough. It has helped me immensely and have learnt some very good new techniques. Thank you once again for your help.
Go to the top of the page
 
Peter Hibbs
post May 13 2020, 01:03 PM
Post#9


UtterAccess VIP
Posts: 1,798
Joined: 17-June 10
From: Dorset. UK.


Hi hemant,

yw.gif

Peter.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    24th May 2020 - 05:06 PM