This discussion is archived
1 2 Previous Next 16 Replies Latest reply: Apr 1, 2013 9:50 AM by Howard (... in Training) RSS

Problem with gantt chart displaying - Apex4.2

Bao Tian Newbie
Currently Being Moderated
Hi I'm using Apex 4.2 on localhost and
I have got three tables: employee, engineer, dates

-> engineer table is a specification of employee table, that means in employee you can find also the
names of the engineers. Engineer only has an additional attribute.

Here's the structure of the three tables:

employee (e_id, lastname, surname....)
engineer (e_id, attribute)
appointment (a_id, e_id,start, end)



Now my problem: By using the gantt chart the xml doesn't want to show the names of the engineers.


If I only use this sql statement everything works but I only have the e_id from my engineer table:

select
null link,
a.e_id,
(select e_id from engineer where e_id = a.e_id) Engineer,
null parent_id,
a.start,
a.end
from appointment a


If I try to use this statement in order to see the names of the employees no chart will be shown,
only xml error:

select
null link,
a.e_id,
(select emp.lastname from employee emp, engineer e where emp.e_id = e.e_id and e.e_id=a.e_id) Engineer,
null parent_id,
a.start,
a.end
from appointment a


I also created a view which combines the lastname from employee and the e_id from engineer
but same problem.

If I try:

select
null link,
a.e_id,
(select e_id from gantt_view where e.e_id=a.e_id) Engineer,
null parent_id,
a.start,
a.end
from appointment a

Then I'll see e_ids in my gantt chart but if I want to see my employee names
with this statement:

select
null link,
a.e_id,
(select lastname from gantt_view where e.e_id=a.e_id) Engineer,
null parent_id,
a.start,
a.end
from appointment a

Nothing is shown on the gantt chart.


I tested all sql statements on sql developer.
There I was able to see my employee names.
But for gantt charts it doesn't work.

Any solutions?
  • 1. Re: Problem with gantt chart displaying - Apex4.2
    scott.wesley Guru
    Currently Being Moderated
    What was the XML error?
    Are there an punctuation/special characters in the last names?
  • 2. Re: Problem with gantt chart displaying - Apex4.2
    Bao Tian Newbie
    Currently Being Moderated
    Following error is shown:

    Category: XML errorError
    code: 11001Message:
    No project data was found


    No I don't have any special characters in last_names.
  • 3. Re: Problem with gantt chart displaying - Apex4.2
    scott.wesley Guru
    Currently Being Moderated
    So this is for a resource gantt? I ask because it's a generic error that I've seen for various reasons.
    Your SQL matches that required for resources gantt, not project gantt.

    I've also seen this when my query cardinality is more than the "Maximum rows" in the chart series attributes. But the fact you get results with ID but not Name is curious.
  • 4. Re: Problem with gantt chart displaying - Apex4.2
    Bao Tian Newbie
    Currently Being Moderated
    Yes, it's a ressource gantt.
  • 5. Re: Problem with gantt chart displaying - Apex4.2
    Howard (... in Training) Pro
    Currently Being Moderated
    This seems to be a not uncommon error with resource Gantt Charts. See
    {thread:id=2157159}
    {thread:id=2376462}

    Like Scott was getting at: What is your Maximum Rows attribute set to?

    Someone else said: "I had exactly the same error. By default the maximum rows attribute within the query series is set to 15. If your query returns more than 15 rows, you will get this error. Set the maximum rows value to something greater than the number of rows returned by your query".

    More: Here's another one: {thread:id=2255099} where the person is trying to use "TRAINER_NAME" for the resource_name. If there's a common thread here perhaps it's the use of a character value resource name. I'm going out on a limb here but could there be a problem when the resource data length is too large?

    ???
    Howard
  • 6. Re: Problem with gantt chart displaying - Apex4.2
    emma-apex Newbie
    Currently Being Moderated
    Hi - just wanted to know if anyone had found a cure for this yet...?

    For me, it's not just a problem that 'Maximum Rows' is a static field - if I set my Maximum Rows >15, my gantt chart disappears...!

    Any help appreciated as this is a great tool

    Thanks
    Emma
  • 7. Re: Problem with gantt chart displaying - Apex4.2
    Howard (... in Training) Pro
    Currently Being Moderated
    Emma,

    Is your data proprietary/confidential? Can you get a new workspace on apex.oracle.ocm and create your chart there? (Use faked data if you want.)Make a generic password to allow us on logon and see how you've set it up. ???

    Howard
  • 8. Re: Problem with gantt chart displaying - Apex4.2
    emma-apex Newbie
    Currently Being Moderated
    Hi Howard

    Thanks for your reply.

    I've copied the app and altered some elements. I've deleted some parts so apologies if it's buggy...

    If you go to 'MI - Project Gantt' you will see the working 15-row gantt.

    If you go to 'MI - Resource Gantt' tab you will see a copy of this region with chart rows set to 200 (or rather, you won't...)

    [I have removed login details]

    Thanks for any help

    Emma

    Edited by: emma-apex on 01-Apr-2013 07:06
  • 9. Re: Problem with gantt chart displaying - Apex4.2
    Howard (... in Training) Pro
    Currently Being Moderated
    Great!

    Of course, hard to diagnose when there's nothing to see.

    Here's an old message in a thread from 2010. (To give credit, it's from Hilary Farrell.)
    >
    You are correct, the syntax outlined in the error message is incorrect, and I've logged bug 9799373 to track this. As a workaround, you can view sample syntax for Gantt charts on the 'Query' page of the Create wizard, in the 'Chart Query Example for Gantt' Show/Hide region below the text area for entering your chart query, and also in the Oracle APEX 4.0 User's Guide that will be available with our new release. Just in case other users hit the same issue and are unsure of the expected format:

    Chart Query Examples for Project Gantt Charts:
    SELECT NULL LINK,
    TASK_NAME NAME,
    TASK_ID ID,
    NULL PARENT_ID,
    START_DATE ACTUAL_START,
    END_DATE ACTUAL_END,
    STATUS_NUMBER PROGRESS
    FROM TASKS

    SELECT 'f?p=4000:2:'||:APP_SESSION||':::P2_ID:'||ID LINK
    TASK_NAME NAME,
    TASK_ID ID,
    PARENT_TASK_ID PARENT_ID,
    START_DATE ACTUAL_START,
    END_DATE ACTUAL_END,
    STATUS_NUMBER PROGRESS
    FROM TASKS

    SELECT NULL LINK,
    TASK_NAME NAME,
    TASK_ID ID,
    NULL PARENT_ID,
    START_DATE ACTUAL_START,
    END_DATE ACTUAL_END,
    STATUS_NUMBER PROGRESS,
    START_DATE-3 PLANNED_START,
    END_DATE+1 PLANNED_END
    FROM TASKS

    Chart Query Examples for Resource Gantt Charts:
    SELECT NULL LINK,
    RESOURCE_ID ID,
    NULL NAME,
    NULL PARENT_ID,
    START_DATE ACTUAL_START,
    END_DATE ACTUAL_END
    FROM TASKS

    SELECT 'f?p=4000:2:'||:APP_SESSION||':::P2_ID:'||ID LINK
    RESOURCE_ID ID,
    RESOURCE_NAME NAME,
    PARENT_ID PARENT_ID,
    START_DATE ACTUAL_START,
    END_DATE ACTUAL_END
    FROM TASKS

    Thanks for reporting this issue, and I'm happy you were able to successfully generate your chart.

    Regards,
    Hilary
    Can you show us the query you are using?

    Oh. And what are the data types and lengths of your data?

    Howard
  • 10. Re: Problem with gantt chart displaying - Apex4.2
    emma-apex Newbie
    Currently Being Moderated
    Hi Howard

    Thanks, details below:

    select NULL link,
    ACTIVITIES_NAME task_name, [VARCHAR2(30)]
    ACTIVITIES_ID task_id, [NUMBER, PK]
    ACTIVITIES_PARENT_ID parent_id, [NUMBER]
    ACTIVITIES_CURRSTARTDATE actual_start, [DATE]
    ACTIVITIES_CURRENDDATE actual_end, [DATE]
    ACTIVITIES_PROGRESS progress, [NUMBER]
    ACTIVITIES_ORIGSTARTDATE planned_start, [DATE]
    ACTIVITIES_ORIGENDDATE planned_end [DATE]
    from "NEWSCHEMA951753"."AA_WL_ACTIVITIES3"

    Incidentally, in the query builder there is also the option to have a "label" defined as well but Apex will not accept my SQL when i offer this as a column, so i have removed it.

    Thanks
    Emma

    Edited by: emma-apex on 01-Apr-2013 06:30

    Edited by: emma-apex on 01-Apr-2013 06:31
  • 11. Re: Problem with gantt chart displaying - Apex4.2
    Howard (... in Training) Pro
    Currently Being Moderated
    I've never done one of these but do you have the columns in the correct order? The documentation I see says:
    Resource Gantt charts require a resource id, resource name, parent resource id, actual start date, and actual end date value for each task. To create a Resource Gantt chart, create a Flash chart and provide a SQL query using the following syntax:
    SELECT link, resource_id, resource_name, resource_parent_id, actual_start_date, actual_end_date
    FROM ...
    >
    Since the names are user defined (right?) don't the columns have to be in a certain order?

    Edited by: Howard (... in Training) on Apr 1, 2013 10:36 AM

    See "Gantt Chart Syntax" here http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_chrt.htm#autoId0

    Howard
  • 12. Re: Problem with gantt chart displaying - Apex4.2
    emma-apex Newbie
    Currently Being Moderated
    Thanks, I think so... it's a project gantt rather than a resource one, so from the same link I should have
    SELECT link, task_name, task_id, parent_task_id, actual_start_date, actual_end_date, progress
    FROM ...
    and that's what I have. Following your logic, I just removed the original start and end dates to see if that worked but still my gantt chart disappears when I change Max Rows to 200.

    The browser displays an yellow error triangle symbol on the bottom left, and when clicked refers me to line 49 char 5; my view source shows this:
    46. <body >
    47. <!--[if lte IE 6]><div id="outdated-browser">You are using an outdated web browser. For a list of supported browsers, please reference the Oracle Application Express Installation Guide.</div><![endif]-->
    48. <form action="wwv_flow.accept" method="post" name="wwv_flow" id="wwvFlowForm" novalidate >
    49. <input type="hidden" name="p_flow_id" value="69746" id="pFlowId" /><input type="hidden" name="p_flow_step_id" value="20" id="pFlowStepId" /><input type="hidden" name="p_instance" value="109695765350274" id="pInstance" /><input type="hidden" name="p_page_submission_id" value="104353609098546" id="pPageSubmissionId" /><input type="hidden" name="p_request" value="" id="pRequest" />
    50. <div class="uParentTabs">
    I'm sure there's a clue to the problem in there but since all of that code is automatically generated I'm not sure why it would fall over for me and work for other people!

    Thanks
    Emma

    Edited by: emma-apex on 01-Apr-2013 08:31
  • 13. Re: Problem with gantt chart displaying - Apex4.2
    TexasApexDeveloper Guru
    Currently Being Moderated
    Have you seen this OBE example of building a resource gantt? : http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r40/apexcharts/apexcharts_ll.htm#t3

    Thank you,

    Tony Miller
    Ruckersville, VA
  • 14. Re: Problem with gantt chart displaying - Apex4.2
    Howard (... in Training) Pro
    Currently Being Moderated
    I'm confused.

    When I got into the application earlier, the "project" page worked but the "resource" one showed nothing but the error triangle. At least, so I remember. So from that, I took it that the problem was with the Resource Gantt and you were showing me the Resource query.

    Okay, some questions:
    1) Which one of these is working: (project or resource)? Because it seems one is and one isn't. Or am I mistaken about that?
    Gantt Chart Syntax
    Project Gantt charts require a task name, task id, parent task id, actual start date, actual_end_date, and progress value for each task. Two optional values for planned start date and planned end date can also be used. To create a Project Gantt chart, create a Flash chart and provide a SQL query using one of the following syntax:
    SELECT link, task_name, task_id, parent_task_id, actual_start_date, actual_end_date, progress
    FROM   ...
    Resource Gantt charts require a resource id, resource name, parent resource id, actual start date, and actual end date value for each task. To create a Resource Gantt chart, create a Flash chart and provide a SQL query using the following syntax:
    SELECT link, resource_id, resource_name, resource_parent_id, actual_start_date, actual_end_date
    FROM   ... 
    2) It seems the order of data is different between the two (project, resource). You account for that, yes?

    Howard
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points