8 Replies Latest reply: Jul 21, 2011 12:44 PM by TexasApexDeveloper RSS

    Problem getting resource gantt to work

    pglux
      I am experimenting with gantt charts in apex 4.0.2 at the moment and having no success. I can find only sparse documentation regarding the building of gantt charts in APEX and have read the entries in the user guide.

      Looking at the xml in debug I see the following error message:

      chart Flash Chart error: ORA-20001: get_data error: ORA-20001: get_data error: ORA-20001: Fetch error: ORA-06502: PL/SQL: numeric or value error: character to number conversion error

      I am basing the query on the following view:

      trainer_activity:
      trainer_id number(6,0)
      trainer_name varchar2(30)
      start_date date
      end_date date

      I used the wizard when creating the page to build the query and it returned the following:

      select null link, TRAINER_ID resource_id, TRAINER_NAME resource_name, null parent_id, START_DATE actual_start, END_DATE actual_end
      from "PG"."TRAINER_ACTIVITY"

      Attempts to build the query manually based on the examples within apex result in constant failures to parse the query. At least using the wizard I can get past the page build process and run the page.

      Any clues? Am I wasting my time using the charts because of bugs?

      Regards
      PaulG
        • 1. Re: Problem getting resource gantt to work
          TexasApexDeveloper
          Sparse documentation?? I think you need to look again:

          http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r40/apexcharts/apexcharts_ll.htm

          This alone should help show you how to develop a Gantt chart in APEX

          Do you know that if all the smokers were laid end to end around the world, three quarters of them would drown?

          Thank you,

          Tony Miller
          Webster, TX
          • 2. Re: Problem getting resource gantt to work
            pglux
            Thanks for the link Tony, unfortunately, there is no explanation as to what apex is expecting for each coulmn referred to in the query. The data types in the columns of my view match those in the tutorial but it still gives the same error. Do you have a link to a specification explaining the requirements of the underlying table/view columns that can be processed?

            Interestingly, if I change resource name to null the chart now displays.

            I will investigate this further
            • 3. Re: Problem getting resource gantt to work
              TexasApexDeveloper
              If you LOOKED at the article, it includes a zip file, which has a few files in it. These files have the table definitions for the data being queried in the chart..
              CREATE TABLE  "GANTT_INFO" 
                 (    "ID" NUMBER, 
                  "TASKS" VARCHAR2(4000), 
                  "START_DATE" DATE, 
                  "END_DATE" DATE, 
                  "STATUS" NUMBER, 
                  "DETAILS" VARCHAR2(4000), 
                  "EMP_ID" NUMBER, 
                  "PARENT_ID" NUMBER
              
              CREATE table "OBE_EMPLOYEES" (
                  "EMPLOYEE_ID" NUMBER(6) NOT NULL,
                  "FIRST_NAME"  VARCHAR2(20),
                  "LAST_NAME"   VARCHAR2(25),
                  "EMAIL"       VARCHAR2(25),
                  "HIRE_DATE"   DATE,
                  constraint  "OBE_EMPLOYEES_PK" primary key ("EMPLOYEE_ID")
              
              CREATE TABLE "EMP"
                (
                  "EMPNO" NUMBER(4,0) NOT NULL ENABLE,
                  "ENAME" VARCHAR2(10 BYTE),
                  "JOB"   VARCHAR2(9 BYTE),
                  "MGR"   NUMBER(4,0),
                  "HIREDATE" DATE,
                  "SAL"    NUMBER(7,2),
                  "COMM"   NUMBER(7,2),
                  "DEPTNO" NUMBER(2,0)
                )
              Thus, you have the tables that are used in the demo presented.. The resource name in question is from the sample application with APEX, table name Emp..

              Thank you,

              Tony Miller
              Webster, TX

              Never Surrender Dreams!
              JMS

              If this question is answered, please mark the thread as closed and assign points where earned..
              • 4. Re: Problem getting resource gantt to work
                pglux
                I have managed to get some display of the data under the following conditions:

                Setting the resource name column to null
                or
                restricting the query using a where clause and the trainer_id

                The value of the items in trainer_id are not consecutive and run from 1 to 16 ( with a couple of gaps) and then 79 and 81. If I limit the query to between 1 and 16 all works fine. If I restrict the query to only 79 and/or 80 all works fine. setting the restriction to between 1 and 79 fails with the "chart Flash Chart error: ORA-20001: get_data error: ORA-20001: get_data error: ORA-20001: Fetch error: ORA-06502: PL/SQL: numeric or value error: character to number conversion error "

                I have the maxiimum rows set to 100.
                • 5. Re: Problem getting resource gantt to work
                  pglux
                  As I said in my reply to your post, my column data types match those used in the tutorial. The problem appears to be elsewhere.
                  • 6. Re: Problem getting resource gantt to work
                    TexasApexDeveloper
                    Have you enabled debugging to see where it MIGHT be happening then??

                    Thank you,

                    Tony Miller
                    Webster, TX

                    Never Surrender Dreams!
                    JMS

                    If this question is answered, please mark the thread as closed and assign points where earned..
                    • 7. Re: Problem getting resource gantt to work
                      pglux
                      I am not getting very far with this and the application now refuses to display the chart consistantly under conditions previously mentioned. I either have something more serious wrong with the database or the application. Either way, I am not spending any more time on this.

                      I am closing the thread unanswered.
                      • 8. Re: Problem getting resource gantt to work
                        TexasApexDeveloper
                        Two things..

                        1) Please change your handle.. user8606264 is VERY unfriendly and we like to know who we are talking to here..
                        2) Can you upload a scaled back version of your application to oracle's hosted site and MAYBE we can take a look and offer some help? Can't hurt to upload the involved tables with data and the pages that call the chart and the chart page itself..

                        Thank you,

                        Tony Miller
                        Webster, TX

                        On the road of life...There are 'windshields', and there are 'bugs'
                        (splat!)
                        "Squeegees Wanted"

                        If this question is answered, please mark the thread as closed and assign points where earned..