Make an hierarchical Tree in oracle Forms 6i

Hi everybody,
I want to make an hierarchical tree. I work in Forms 6i
I create one non database block e.g. 'Bloc2' then
add hierarchical control item in that. e.g 'Menu'.
I create a record group named 'RG_DATA_TEST'
Before I use a table in this record_group.
I want a tree as this :
- Menu1
Menu1 option1
Menu1 option2
- Menu1 option3
Menu option3 Sub opt 3
+ Menu2
the table 'Menu_tree' is described' :
CREATE TABLE MENU_tree
ID NUMBER(5),
LABEL VARCHAR2(128 BYTE),
ICON VARCHAR2(40 BYTE),
MASTER NUMBER(5),
STATUS NUMBER(1) DEFAULT 1,
VALUE VARCHAR2(128 BYTE)
Here the data in the table :
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (1, 'Menu1', 'mainmenu', NULL, 1, NULL);
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (
2, 'Menu1 Option 1', 'optionmenu', 1, 1, 'Dialog11');
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 3, 'Menu1 Option 2', 'optionmenu', 1, 1, dialog12');
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (4, 'Menu1 Option 3', 'optionmenu', 1, 1, NULL);
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 5, 'Menu1 Opt 3 Sub Opt 3', 'suboptionmenu', 4, 1, 'Dialog131');
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 6, 'Menu2', 'mainmenu', NULL, -1, NULL);
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 7, 'Menu2 Option1', 'optionmenu', 6, 1,'Dialog21');
The record_group use this instruction SELECT :
SELECT STATUS, LEVEL, LABEL, ICON, VALUE
FROM MENU_tree
CONNECT BY PRIOR ID = MASTER
START WITH MASTER IS NULL
And At the trigger When_new_form_instance , i do this code :
DECLARE
htree ITEM;
V_IGNORE number;
BEGIN
HTREE := FIND_ITEM('BLOC2.MENU');
V_IGNORE := POPULATE_GROUP('RG_DATA_TEST');
FTREE.POPULATE_TREE(htree);
END;
When i run the forms, It don't give me a structure of node.
It give me only a icon with two arrows.
Where is the problem ?
Must I add code somewhere ?
Help me for your ideas.
Regards.
Edited by: 794982 on 17 sept. 2010 04:55
Edited by: 794982 on 17 sept. 2010 05:01
Edited by: 794982 on 17 sept. 2010 05:04
Edited by: 794982 on 17 sept. 2010 05:06
Edited by: 794982 on 17 sept. 2010 05:13
Edited by: 794982 on 17 sept. 2010 05:19
Edited by: 794982 on 17 sept. 2010 05:23

Ok Francois Thanks for your response.
Just I pricise i work with oracle forms version 9.0.4.0.19 .
But I am putting this code in trigger When_New_form_Instance but it didn't work.
When I execute it just shows a line with two arrows but not a real tree.
Then I do a block-non based and a elemnt with type hierarticall tree and a canevas.
and i create a record_group. and in a palette property of the element i precise the canevas and the record_group
I don't khnow where is the problem ?
Any other suggestion ? please
Regards.

Similar Messages

  • Add checkbox on the nodes of Hierarchical tree in oracle forms 9i

    Hi,
    I am working on oracle forms 9i.I have to add checkbox at the place of node(+/-) in Hierarchical tree so,
    that user can select or deselect the Tree.That can do in oracle forms but how i don't know.
    can anybody help me.....
    Regards,
    Hemant

    You can't change this aspect of the Tree Control in Oracle Forms using built-in functionality. You might be able to extend the Tree Control using Java, but you have to do this yourself. : (
    Craig...

  • Tooltip not visible on hierarchical tree in Oracle Forms 11g

    *Hi..  i have tried to set the "TOOLTIP" option for an hierarchical item during design time(property palatte) and also at run time( set_item_property).
    But still its not working!!!
    However it works for Oracle 10g forms.
    Is this some kind of restriction only in Oracle 11g forms for the hierarchical items? Please help!

    You can't change this aspect of the Tree Control in Oracle Forms using built-in functionality. You might be able to extend the Tree Control using Java, but you have to do this yourself. : (
    Craig...

  • Hierarchy tree in oracle forms problem

    Hello Experts,
                         I am new in oracle forms.I am using oracle forms 11g with weblogic server 10.3.5 at windows 7.I have two table as tbl_country and tbl_state.I have to make a hierarchy tree in oracle forms.My table structure as:
    tbl_country
    CREATE TABLE "SCOTT"."TBL_COUNTRY"
       (    "CNTRY_CODE" NUMBER NOT NULL ENABLE,
        "NAME" VARCHAR2(80 BYTE),
         CONSTRAINT "TBL_COUNTRY_PK" PRIMARY KEY ("CNTRY_CODE")  
    tbl_state:
    CREATE TABLE "SCOTT"."TBL_STATE"
       (    "SATE_CODE" NUMBER NOT NULL ENABLE,
        "COUNTRY_CODE" NUMBER NOT NULL ENABLE,
        "STATE_NM" VARCHAR2(80 BYTE),
         CONSTRAINT "TBL_STATE_PK" PRIMARY KEY ("SATE_CODE")
         CONSTRAINT "FK_CNTRY_STATE" FOREIGN KEY ("COUNTRY_CODE")
    Table Date as:
    insert into tbl_COUNTRY values(0,'country ');
    insert into tbl_COUNTRY values(91,'HHH');
    insert into tbl_COUNTRY values(72,'III');
    insert into tbl_COUNTRY values(83,'JJJ');
    insert into tbl_state values(1,'state',0);
    insert into tbl_state values(2,'BH',91);
    insert into tbl_state values(3,'CI',72);
    insert into tbl_state values(4,'DI',72);
    insert into tbl_state values(5,'EH',91);
    insert into tbl_state values(6,'FI',72);
    insert into tbl_state values(7,'GJ',83);
    insert into tbl_state values(8,'HJ',83);
    insert into tbl_state values(9,'IH',91);
    Desired Output in oracle forms tree:
    |__Country
             |____HHH
                       |____BH
                       |____EH
                       |____IH
             |____III
                      |__CI
                      |__DI
                      |__FI
             |____JJJ
                       |__GJ
                       |__HJ
    I Have tried but got no output
    select
    1 ,level, esm.name,NULL,to_char(esm.CNTRY_CODE)
    from   (SELECT c.name,c.cntry_code from TBL_COUNTRY c union all select s.STATE_NM,s.COUNTRY_CODE from tbl_state s) esm
    connect by prior esm.CNTRY_CODE = esm.CNTRY_CODE
    start   with esm.code=0
    what is going wrong here.
    thank you
    regards
    aaditya

    If you have never worked with a Forms Tree control, I recommend you look at this tutorial: How To Create a Hierachical Tree form.
    Craig...

  • Hierarchical Field in Oracle Forms

    Hi Experts
    Can any one please give me a sample code to write a hierarchical field in Oracle Forms. I want to display
    Category->Organization->Item->Quantity
    Thanks in Advance.
    Ahmed

    okay,
    place your treeitem in the layout. The treeitem has to the only item in the block and property "Single record" has to be true.
    To populate your tree with data you can either
    - use a query to populate a treeitem have a look at this thread Tree Menu
    - use the Ftree.Add_Tree_Node built-in and program your own logic.

  • Hierarchical tree - Data Entry Form

    I am trying to make a data entry form for hierarchical tree. Any one help me to send a sample .fmb file.
    I created a table like
    create table master_ACTIVITY
    (INITIAL_LEVEL NUMBER (4) ,
    NODE_DEPTH NUMBER (4) ,
    NODE_LABEL VARCHAR2(160) ,
    NODE_ICON VARCHAR2(60) ,
    NODE_DATA VARCHAR2(160) ,
    NODE_PARENT VARCHAR2(160)
    1. How do i use hierarchical tree for adding and deleting item into it.
    2. In my other form i use the item from hierarchical tree. so how to get the return value of the selected item in a hierarchical tree. and which of filed in this table i need in other forms to connect to this table and get values.
    please send a sample form to [email protected]
    thank you
    saji daniel

    Andreas,
    It got worked.
    I have another problem now. I have 2000 records in my tree. when i populate it is taking time to populate.
    I want to display only parent trees ie Level 1 & 2 Items. But the Level 1 & 2 should have '+' symbol to display.
    When the user click on any items in level 2, only then the child of the selected parent should populate.
    By default all the items are displayed in collapsed mode (-1). But still it take time to populate.
    Any solution ?.

  • Hierarchical Tree IN Oracle FORMS6i and oracle 9i

    Hi ,
    I have written all the scenarios as follows. Please write in steps to do this.
    I have the follwing scenario to create the hierarchical tree.
    The display is as follows when the user comes to this screen.
    CTRLBLK1 CTRLBLK2
    SCOTT This block is hidden
    John
    The way I want it when the user is clicking scott it is displaying the records in the other block
    the full tree expanded not collapasble.
    Scenario1
    CTRLBLK1 CTRLBLK2
    SCOTT President
    VP
    Manager
    Same is over here in scenario2
    Scenario2
    CTRLBLK1 CTRLBLK2
    John President
    VP
    Manager
    Clerk
    The tree should be displayed not collapsed. What is way to do the above
    in forms. I tried to do the way suggested in OTN. But i didnot reached to the solution.
    The way I want it when the user is clicking scott it is displaying the records in the other block
    the full tree expanded not collapasble.
    Pls help.
    Thanks,
    PS

    1) create a item Hierarchical Tree,
    ANS: The tree is created
    2) put this to pull in data to the Tree
    DECLARE
    l_query VARCHAR2(500);
    BEGIN
    l_query := '';
    FTREE.SET_TREE_PROPERTY ( c_tree_blk_item_nm, FTREE.QUERY_TEXT, l_query );
    FTREE.POPULATE_TREE ( c_tree_blk_item_nm );
    go_node ( c_tree_root_node );
    IF FTREE.GET_TREE_PROPERTY (c_tree_blk_item_nm, FTREE.NODE_COUNT ) = 1 THEN
    po_found := FALSE;
    ELSE
    po_found := TRUE;
    END IF;
    END;
    Ans: I wrote this code in WHEN_NEW_FORM_INSTANCE trigger. But the code didnot got compiled . I did cut and paste of query too.
    Pls help me in defining the c_tree_blk_item_nm and go_node ( c_tree_root_node ). I was thinking some code of this type would work.
    The code itself didnot got compiled. It didnot ran.
    3) put this coding into WHEN-TREE-NODE-SELECTED trigger under the item, this is to populate the data to other block when u select the tree node.
    IF :SYSTEM.TRIGGER_NODE_SELECTED = 'TRUE' THEN
    GO_BLOCK ( 'BK_AGT' );
    EXECUTE_QUERY;
    SYNCHRONIZE;
    end if;
    BK_AGT is the 2nd control block .
    Help me in solution for this scenario in creating the hierarchical tree in forms6i.
    -KJJJ

  • Hierarchical tree in web forms 10g - form freezing

    I have an application with an hierarchical tree on one of the forms - the application worked fine as client/server back in forms 6 but now that it is web enabled in 10g there are problems with the tree causing the form to freeze, then the entire application has to be closed. It doesn't seem to matter if you are selecting a node or creating a new node both have caused the form to freeze. It doesn't happen all of the time but it seems that the longer the application has been in use the more it starts to freeze. Any ideas? Is there a known problem with trees in web forms? Thanks
    Joanne

    At the root of my tree is a patient (I work in the health care industry) and then for that patient there are clinic visits, surgeries, etc (there are 16 nodes at this level). and under each of these are dates when the visits occured (there can be an unlimited number of nodes at this level). This is some of my code for populating the tree:
    if :GLOBAL.patient_seq is not null then
    -- turn the tree on
    set_item_property('tree_block.tree_item', ENABLED, PROPERTY_TRUE);     
    set_item_property('tree_block.tree_item', NAVIGABLE, PROPERTY_TRUE);          
    lv_tree_id := find_item('TREE_BLOCK.TREE_ITEM');     
    --refresh the tree back to it's original state from the database                          
    Ftree.Set_Tree_Property(lv_tree_id,
         Ftree.RECORD_GROUP,
         FIND_GROUP('TREE_GROUP'));
    -- create the clinic visits branch
    wcchn_tree_items_pkg.get_visits(lv_visit_table, :global.patient_seq);
    for lv_counter in 1.. lv_visit_table.count loop
    lv_site := wcchn_locations_pkg.get_location_code(lv_visit_table(lv_counter).site);
    create_visit_node( lv_visit_table(lv_counter).visit_date || ' - ' || lv_site,
         lv_tree_id,
    lv_visit_table(lv_counter).seq_nr);
    end loop;
    Below is the procedure referred to in the above segment of code:
    PROCEDURE CREATE_VISIT_NODE (pi_date IN VARCHAR2, pi_tree_id IN ITEM, pi_seq IN NUMBER) IS
    lv_return_value NUMBER;
    lv_node_value varchar2(100);
    lv_search_node FTREE.node;
    BEGIN
    lv_search_node:=FTREE.Find_Tree_Node(pi_tree_id,                              'CLINIC VISITS',                         FTREE.FIND_NEXT,                         FTREE.NODE_LABEL,                         FTREE.ROOT_NODE,                         FTREE.ROOT_NODE);
    lv_node_value:='G' || to_char(pi_seq);
    if :GLOBAL.ACTION_INDICATOR = 'INSERT' then
              lv_return_value:=FTREE.Add_Tree_Node(pi_tree_id,                    lv_search_node,                         FTREE.PARENT_OFFSET,                          1,                                    FTREE.LEAF_NODE,                          pi_date,                                   NULL,                                    lv_node_value);
    else
              lv_return_value:=FTREE.Add_Tree_Node(pi_tree_id,                              lv_search_node,                          FTREE.PARENT_OFFSET,                          FTREE.LAST_CHILD,                          FTREE.LEAF_NODE,                          pi_date,                                   NULL,                                    lv_node_value);
    end if;
         FTREE.Set_Tree_Node_Property(pi_tree_id,                              lv_search_node,                              FTREE.NODE_STATE,                         FTREE.EXPANDED_NODE);
    END;

  • It's possible to make Hierarchical Tree from multiple tables ?

    the famous example for Hierarchical Tree is about employee_id and manager_id field in employees table ............ so I was wondering it's possible to make[b] Hierarchical Tree from multiple tables ? and How ??
    if the answer associate with example that will be so kind of you :D
    and thanks in advance.

    HI
    use curose in when new form instance or procedure then u can got data more then one table like that
    DECLARE
    htree ITEM;
    top_node FTREE.NODE;
    new_node FTREE.NODE ;
    child_node ftree.node ;
    item_value VARCHAR2(30);
    cursor prime_cur is select main_desc mgr_name, main_code dept
    from pur_item_group_mst;
    cursor child_cur(v_dept number) is select sub_desc,sub_code
    from pur_item_group_dtl where main_code = v_dept ;
    BEGIN
    htree := Find_Item('tmp.tree4');
    for dummy in prime_cur loop
    new_node := Ftree.Add_Tree_Node(htree,
    ftree.root_node,
    Ftree.PARENT_OFFSET,
    Ftree.LAST_CHILD,
    Ftree.EXPANDED_NODE,
    dummy.mgr_name,
    'D:\ORYX_POLYBAGS\accept',
    dummy.dept);
    for child in child_cur(dummy.dept) loop
         child_node := Ftree.Add_Tree_Node(htree,
    new_node,
    Ftree.PARENT_OFFSET,
    Ftree.LAST_CHILD,
    Ftree.EXPANDED_NODE,
    child.sub_desc||' '||'('||child.sub_code||' '||')',
    'D:\ORYX_POLYBAGS\next',
    child.sub_code);
    end loop;
    end loop;
    END;
    Rizwan Shafiq
    www.rizwanshafiq.blogspot.com

  • How to make picture button in oracle forms?

    can any one tell me how to make a picture button in oracle form builder?
    please help?

    Hi,
    Only a icon can be pasted on the push button. We can not user jpg,,jpeg or gif for the picture only ico file can be used.
    go to properyt pallet,
    make iconic as yes
    give the path in icon filename --- C:\Program Files\Winamp\eMusic\eMusicClient
    where eMusicClient is -- icon file name without extension, dont use " " in path
    bye

  • How to add Icon in Tree View in Forms 6.0 (URGENT..!)

    Hello All,
    I want to add icons in tree view (hierarchical tree) by using
    forms 6.0.
    So pls. help me to find out the solution for the same.
    thanks
    Pradeep
    null

    Pradeep (guest) wrote:
    : Hello All,
    : I want to add icons in tree view (hierarchical tree) by using
    : forms 6.0.
    : So pls. help me to find out the solution for the same.
    : thanks
    : Pradeep
    hello pradeep,
    for adding icons in the tree, u willhave to look closely to the
    data format for the tree.in the data format used for populating
    the tree we are supplying 5 fields. the state of the tree node
    (expanded or collapsed), the depth of the node w.r.t the parent
    node, the node value, the node label(what we see on the tree)
    and the node icon which we want to use. for the node icon we
    have to provide the entire path of the icon file. that's it.
    hope this will solve the problem
    null

  • Problem when selecting child node in Hierarchical Tree

    I have a hierarchical tree on a form populated thru a table query(form1). When I click on a child node, it opens form2 which contains a tab canvas. After closing forms, I return to the form1(containing Tree). At this point If I want to click on the same child node, I should be able to open form2 again. This doesn't happen.
    I have the following code in my When-Tree-node_selected trigger:
    Declare
    htree item;
    vnode_label varchar2(50);
    node_clicked FTREE.NODE;
    vnode_value number;
    vnode_depth number;
    v_type number;
    v_value varchar2(100);
    v_form_name varchar2(100);
    v_alert_return number;
    begin
    -- Find the tree itself.
    htree := FIND_ITEM('tree_block.tree');
    node_clicked := :SYSTEM.TRIGGER_NODE;
    vnode_value := FTREE.NODE_label;
    -- Find the value of the node clicked on.
    vnode_label := FTREE.GET_TREE_NODE_PROPERTY (htree,:SYSTEM.TRIGGER_NODE,FTREE.NODE_label);
    vnode_depth := to_number(ftree.get_tree_node_property(htree,:SYSTEM.TRIGGER_NODE,ftree.Node_depth));
    --Open form for node selected on tree and/or specific tab page
    if vnode_depth <> 1 then
    if :system.trigger_node_selected = 'TRUE' then CASE vnode_label
    WHEN 'Personal' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    WHEN 'Citizenship' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    WHEN 'Emergency Contact' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    if id_null(Find_form(v_form_name)) then
    open_form(:global.application_path || v_form_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA);
    else
    go_form(v_form_name);
    end if;
    END IF;
    elsif vnode_depth = 1 then
    if :system.trigger_node_SELECTED = 'TRUE' then CASE vnode_label
    WHEN 'EMPLOYEE INFO' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    vnode_label := 'Personal';
    WHEN 'REPORTS' then
    v_form_name :='HR_REPORTS';
    vnode_label := '';
    if id_null(Find_form(v_form_name)) then
    v_form_name := :global.application_path || v_form_name;
    open_form(v_form_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA);--,p_list);
    else
    go_form(v_form_name);
    end if;
    end if;
    end;
    Can anyone please help me? I don't want the user to double click. They should only click once.
    Thanks,
    Mercedes

    Right clicking does not change the current selection. The tree has no way to report what node was right clicked. Only work around is to left click the node you wish then right click it.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                       

  • How i can make web application by using oracle form6i

    how i can make web application by using oracle form 6i , indetail .
    A.R

    indetail .As Andy Millman might observe, you're having a laugh. This is a big topic, far exceeding what it is reasonable to expect people to help out with in a Forum. Do you not have the 6i documentation?
    OTN has a site for upgarding to web forms. Although it is mainly focussed on moving to 9i/10g a lot of the issues and solutions apply to moving a 6i client/server app to web deployment. For further help there is a Forms.
    Cheers, APC

  • Tree view in Oracle forms

    Hello experts,
                         I am new in oracle forms and i am using oracle forms 11g with weblogic server 10.3.5 at windows7.I have a problem to make a tree item in oracle forms based on two tables.
    I have 2 tables as:
    TBL_ARTICAL_MSTR
    ARTICLE_ID
    ATRTICLE_TYPE
    1
    MAN
    2
    Women
    TBL_ARTICLE_DTL
    ARTICLE_NO
    NAME
    ARTICLE_ID
    1
    Jeans
    1
    2
    Skirts
    2
    3
    T-Shirt
    1
    Now I want a tree view as:
    |
    |___MAN
    |       |______JEANS
    |       |______T-Shirt
    |
    |___WOMEN
            |______Skirts
    For this I have made a Record group  with a sql query as:
    SELECT 1 , level , TBL_ARTICAL_MSTR.ATRTICLE_TYPE,TBL_ARTICLE_DTL.NAME , NULL , to_char( TBL_ARTICLE_DTL.ARTICLE_NO)
    FROM TBL_ARTICAL_MSTR LEFT JOIN TBL_ARTICLE_DTL ON TBL_ARTICAL_MSTR.ARTICLE_ID=TBL_ARTICLE_DTL.ARTICLE_ID
    CONNECT BY prior TBL_ARTICLE_DTL.ARTICLE_NO = TBL_ARTICAL_MSTR.ARTICLE_ID
    START WITH TBL_ARTICAL_MSTR.ARTICLE_ID=1
    But There is no any output,Please help me to know that how can i solve it.
    Thank You
    regards
    aaditya.

    how to create hierarchical tree form
    https://sites.google.com/site/craigsoraclestuff/oracle-forms---how-to-s/forms-how-to-create-a-hierachical-tree-form

  • Call forms and reports from a hierarchical tree node.

    Hello,
    I am new in pl/sql programming and I have some dificulties. I have created a hierarchical tree, in order to use it as a menu in an application that I am trying to develope. The problem is that I do not know how can I make the last nodes to be either a form or a report and when somebody double clicks on these nodes the form or the report will run. What is more, should I use the when-tree-node-selected trigger or the when-tree-node-activated?
    Thank you in advance,
    Vag

    Hi ,
    In Oracle Forms , a hierarchical tree is developed through the use of a sql statement and column which defines the order of leaves...
    Visit the on-line help of Forms10g to find out the details , and the triggers as well...
    Something else...post this question to Oracle Forms to get more detailed answer...
    Regards,
    Simon

Maybe you are looking for