This topic is locked
[SOLVED]

 Gantt Chart

9/5/2018 10:50:31 PM
PHPRunner General questions
M
Melanie authorDevClub member

I followed the tutorial for Adding GANTT chart to PHPRunner/ASPRunnerPro app - it was straightforward and seems like it will work very well for what we want to do, but I cannot make it work. I set up 2 tables with the same names and fields as in the tutorial and they have data in them with a common link (1 distinct project record to multiple tasks). I did use a different column name in each table for the link (instead of projectid I am using aircraft_oid which has 1 record in the project table and many in the task table). I then edited the gantt.php table with this change ($sql = "select * from tblTasks where aircraft_oid=".$_REQUEST["aircraft_oid"]." Order by TaskNumber"; ) and edited the snippet in my View page (

$myFile = "gantt.php?aircraft_oid=".$_REQUEST["editid1"];

//$myFile="gantt.xml"<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=25834&image=1&table=forumtopics' class='bbc_emoticon' alt=';)' /> So in those three places I replaced projectid with aircraft_oid which are the linking columns in my two tables. The view page shows the project data and all of the detail data below it, the snippit is placed in between on the view page, but instead of a gantt chart, there is only the text Gantt.
I did copy the jsgantt.js and css files to the output directory (do they need to go somewhere else? Do I need any other files?
I see the comments on the tutorial a few people had the same issue (no chart, just the word Gantt) but no answer. One person said he solved it because he made tables and the table names were all lower case but the code had mixed case - so I did make sure that I checked that and they do match.
Has anyone else experienced this or have any suggestions?

fhumanes 9/6/2018
M
Melanie authorDevClub member 9/6/2018

I was using custom views and not tables for my Gantt and this was not working - I created 2 views in my SQL database named tblProject and tblTasks and I can now get a Gantt chart. My next problem is that my query pulls 5 years worth of projects and of course even if I filter the data on my page, the Gantt sill uses everything in the Tasks table - so I need to see if I can pass a date range as well as the projectid.
Thanks to the excellent support from xlinesoft for their help!.

M
Melanie authorDevClub member 9/7/2018



I was using custom views and not tables for my Gantt and this was not working - I created 2 views in my SQL database named tblProject and tblTasks and I can now get a Gantt chart. My next problem is that my query pulls 5 years worth of projects and of course even if I filter the data on my page, the Gantt sill uses everything in the Tasks table - so I need to see if I can pass a date range as well as the projectid.
Thanks to the excellent support from xlinesoft for their help!.


I have also discovered I can use multiple jsgantt charts in my project so I can easily do a 30 day, 90 day, 1 year, 3 years etc and have a page for each - so will do that.