Newbei tries to create hierarchical tree

hi all;
I'm pretty new to the oracle forms and I'm trying to create a system similar to forum.
I have created the following table at the database;
create table tblFrmData(
frmID number(2), -- forum ID
frmNodeID number(5),
frmParentNodeID number(5), -- the NodeID of the parent branch
frmSubject varchar(100), -- the subject ( will be the label of tree)
frmBody varchar(1000), -- the body of the message (will be the data of the tree)
Now I want to create a tree depending on the data in this table
I have created the tree with dragging and droping from the toolbar at forms. The name is tree8. It is in block3.
I have also created a record group and named it as RG. The select statement used while creating the RG was
select -1, frmNodeID, frmSubject,'', frmBody from tblFrmData
after that I have modified when-new-item-instance trigger of tree8 as following
declare
htree ITEM;
begin
htree:=Find_Item('block3.htree8');
Ftree.Set_Tree_Property(htree, Ftree.RECORD_GROUP, 'rg');
end;
this trigger was compiled without error.
when I save the form and try to run it the following error is given! And I do not know how to solve it although I have readed the referances and looked at the old questions in this forum.
frm-32089: trees must be in single row, single item blocks.
hierarchical tree item TREE8
Block: BLOCK3
Form: FORM_TREE
frm-30085:Unable to adjust form for output
I'm waiting for your answers
regards
erdem seherler

Just ensure that the Hierarchical Tree you have created is the only Item present in that Data Block.
Move all other items to a new Data Block.

Similar Messages

  • How do we create Hierarchical tree??

    Can I get help on creating hirerchical tree with detailed description ?? I tried basing hierarchical item on query but it didn't work.Do i need to specifically give code for populating it ??
    Also I need help on basing it on Record Group ??
    Is there any rule for having specific no of columns for a tree ??

    You can create Hierarchical Tree in two ways.
    One using "connect by prior" and another
    by Adding columns and row to record group at run time.
    If your table has Self reference Key then
    you can create using connect by prior.
    Otherwise you have to go for second one.
    Go and check the navwiz.fmb in oracle demo files.
    Following example is from navwiz.fmb
    (open navwiz.pll and then check refresh_tree)
    In this example they used both.For Emp they used connect by prior.
    PROCEDURE refresh_trees(p_view VARCHAR2) IS
    cursor cursor_dept is
    select dname, deptno
    from dept
    order by dname;
    cursor cursor_emp(p_dno number) is
    select ename, empno
    from emp
    where deptno = p_dno
    order by ename;
    v_i number;
    v_ignore number;
    rg_emps recordgroup;
    rg_depts recordgroup;
    v_init_state groupcolumn;
    v_level groupcolumn;
    v_label groupcolumn;
    v_icon groupcolumn;
    v_value groupcolumn;
    begin
    if p_view = 'EMP' then
    --the emps hierarchy
    rg_emps := find_group('EMPS');
    if not id_null(rg_emps) then
    delete_group(rg_emps);
    end if;
    rg_emps := create_group_from_query('EMPS',
    'select 1, level, ename, NULL, to_char(empno) ' | |
    'from emp ' | |
    'connect by prior empno = mgr ' | |
    'start with mgr IS NULL');
    v_ignore := populate_group(rg_emps);
    ftree.set_tree_property('navigator.nav_display', ftree.record_group, rg_emps);
    else
    --the organization
    rg_depts := find_group('DEPTS');
    if not id_null(rg_depts) then
    delete_group(rg_depts);
    end if;
    rg_depts := create_group('DEPTS');
    v_init_state := add_group_column(rg_depts, 'init_state', number_column);
    v_level := add_group_column(rg_depts, 'level', number_column);
    v_label := add_group_column(rg_depts, 'label', char_column, 40);
    v_icon := add_group_column(rg_depts, 'icon', char_column, 20);
    v_value := add_group_column(rg_depts, 'value', char_column, 5);
    v_i := 1;
    for deptrec in cursor_dept loop
    add_group_row(rg_depts, v_i);
    set_group_number_cell(v_init_state, v_i, 1);
    set_group_number_cell(v_level , v_i, 1);
    set_group_char_cell (v_label , v_i, deptrec.dname);
    set_group_char_cell (v_icon , v_i, NULL);
    set_group_char_cell (v_value , v_i, to_char(deptrec.deptno));
    v_i := v_i + 1;
    for emprec in cursor_emp(deptrec.deptno) loop
    add_group_row(rg_depts, v_i);
    set_group_number_cell(v_init_state, v_i, 1);
    set_group_number_cell(v_level , v_i, 2);
    set_group_char_cell (v_label , v_i, emprec.ename);
    set_group_char_cell (v_icon , v_i, NULL);
    set_group_char_cell (v_value , v_i, to_char(emprec.empno));
    v_i := v_i + 1;
    end loop;
    end loop;
    ftree.set_tree_property('navigator.nav_display', ftree.record_group, rg_depts);
    end if;
    My query******
    procedure refresh1 is
    v_i number;
    v_ignore number;
    Rg_Menus recordgroup;
    rg_depts recordgroup;
    Begin
    Rg_Menus := find_group('MENUS');
    If not id_null(Rg_Menus) then
    delete_group(Rg_Menus);
    End If;
    Rg_Menus := create_group_from_query('MENUS',
    'select 1, level, item_name, NULL, item_id ' | |
    'from Item_all '
    | |' where Item_id in (select Item_id from Item_access_all where role_id in
    (select role_id from org_access_all where user_id =
    (select gsp_user_id from users_all where upper(user_name) = upper(USER))
    and code = :global.code) )
    and item_id not in (select item_id from item_Exception where Code = :Global.Code)' | |
    'connect by prior item_name = main_name ' | |
    'start with item_name = ''MAIN''');
    v_ignore := populate_group(Rg_Menus);
    ftree.set_tree_property('tree_blk.tree_menu', ftree.record_group,Rg_Menus);
    Exception
    When Others then
    Bell;
    Message('You cannot Access any menu item...');
    Raise Form_trigger_Failure;
    End;
    viji.
    null

  • Is it possible to create hierarchical tree report (not group tree) CR2008?

    Hi,
    Is it possible to create hierarchical tree kind report using CR 2008(no group tree in the report)?  The report somewhat look like below and a node can have multiple Child and so and so. Is there any magical way either as a chart or any object which supports the below structure.
                                                          Parent1
                                           Child1              Child2             Child3             Child4          Child5
                     Child1A     Child1B      Child1C
        Child1Aa  Child1Ab
    its hierarchical tree  structure and it should be in detail section of the report so that print in paper is possible.
    Please help first of all, can we able to create a report in above structure(each item needs to be surronuded with box and the each last child will contain a table valued data.
    (if I post this thread, it may look like plain text, please consider the above data as a hierarchical tree  structure with child having N number of children)
    Thanks

    Moved from .NET Development - Crystal Reports forum to Crystal Reports Design forum.
    Ludek

  • ORA-20000 Error When Attempting to Create a Tree

    Hi,
    I'm trying to create a tree region as follows.
    1) in SQL*Plus as APP: grant select on APP.MY_TABLE to APX
    2) in APEX against APX workspace with APX parsing schema: create a new Tree region
    3) when I get to the "Table/View Owner" step I select APP from the "Table / View Owner" list
    4) hitting Next produces this error
    ORA-20000: User APX has no privileges on the APP schema.
    I checked the documentation but found no prerequisites listed in the "Creating Trees" section. What privileges does APX need to create a tree against an APP table? I expect SELECT privileges would be sufficient but that doesn't appear to be the case.
    Edited by: jfuda on Jul 25, 2011 3:10 PM

    Try to set env variable ORACLE_HOME
    Best Regards
    Krystian Zieja / mob

  • How to create a tree structure with check boxs using Windows Activex Control?

    Hi,
    I am very new to LabVIEW. I am trying to create a tree structure with Check Boxes like the below. It would be great if someone would show me a right direction to go forward.
    The aim is to select the item and one by one i have to get the Path and give as an input to by application VI.
    Thanks and Best Regards
    Prathap

    Hi Andy,
    Sorry i pasted the Picture.. Pls find the attached picture.
    Following are my requirement:
    1) I need to populate a tree given a root directory, listing all the Folders and file of cetain pattern(*.pjt... ther will be only one *.pjt in every subfolders).
    2) I need a check box for every *.pjt to select the its path. The list of pjt files selected are used for my automation test suit.
    Pls let me know if you need more info.
    Best Regards
    Prathap
    Attachments:
    tree.JPG ‏73 KB

  • Error while trying to create tree using same EMP how to tutorial

    Hi,
    I get the following error while trying to create a sample tree similar to the one
    posted in the how-tos web page.
    The final query that creates the tree is also as follows
    The Current Query shown in my apex window and the one on the howtos tutorial is as follows
    select "EMPNO" id,
    "MGR" pid,
    "ENAME" name,
    null link,
    null a1,
    null a2
    from "RJOSEEMPCLUB"."EMP"
    where DEPTNO = 1
    The error is as follows
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Debug:
    1: begin
    2: wwv_flow_wiz_confirm.create_tree (
    3: p_flow_id => :FB_FLOW_ID,
    4: p_region_template => replace(:F4000_P112_REGION_TEMPLATE,'%'||'null%',null),
    5: p_start_option => :F4000_P112_START_OPTION,
    6: p_owner => :F4000_P112_OWNER,
    7: p_table_name => :F4000_P112_TABLE,
    8: p_id => :F4000_P112_ID,
    9: p_pid => :F4000_P112_PID,
    10: p_name => :F4000_P112_NAME,
    11: p_link_option => :F4000_P112_LINK_OPTION,
    12: p_link_page_id => :F4000_P112_LINK_PAGE_ID,
    13: p_link_item => :F4000_P112_LINK_ITEM,
    14: p_where => :F4000_P112_WHERE,
    15: p_order_by => :F4000_P112_ORDER_BY,
    16: p_page_id => :F4000_P112_PAGE_ID,
    17: p_page_name => :F4000_P112_PAGE_NAME,
    18: p_tab_set => :F4000_P112_TAB_SET,
    19: p_tab_text => :F4000_P112_TAB_TEXT,
    20: p_region_name => :F4000_P112_REGION_NAME,
    21: p_tree_name => :F4000_P112_TREE_NAME,
    22: p_tree_type => :F4000_P112_TREE_TYPE,
    23: p_max_levels => :F4000_P112_MAX_LEVELS);
    24: end;

    Hi Kart,
    If you have the sample EMP table, the DEPTNO values are 10, 20 or 30.
    Did you specify a root value for the tree?
    Regards
    Andy

  • Creating a Hierarchical Tree in Forma 6i

    Hi Gurus,
    We are using forms 6i and oracle 9i. In oracle forms i have one control block and another control block. When we click on one column repname ,the other control block displays the
    corresponding info for the sales rep name. eg. Lets say i pick John the salesrep in the other
    control block it displays its code,geography region etc.
    I want to create a hierarchical tree in the other block where it is displaying the salesrep info.
    So i want when i click on the sales rep name(the other control block measure)
    then it should the code,geography region etc in the form of hierarchical tree in the other control
    block. If the sales rep name is not clicked then the control block having the salesrep info should be hidden.
    I would appreciate your help.
    Thanks,
    PSO

    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.

  • Creating a hierarchical tree

    Hi,
    I have 3 tables t1, t2, t3.
    t1 is the master of t2.
    t2 is the master of t3.
    Data in t1:
    seq      name
    1          m
    2          g
    Date in t2
    seq  t1_seq    name
    1         1         mani
    2         1         julia
    3         2        kali
    4         2        mali
    5         2         toli
    data  in t3
    seq  t2_seq    title
    1         1         manager
    2         1         clerk
    3         2        developer
    4         2        clerk
    5         2         salesman
    6         4        manager
    7         4        clerk
    8         2        developer
    9         3        clerk
    10        3         developer---------------------------------------------------------------------------------------------------
    I want the data to print for t1 seq = 1 in the following way:
    mani
           manager
           clerk
    julia
         developer
          clerk
          salesmanI have written the code in the following way but it was not displaying the result. Please correct me where i am going wrong.
    Note: the data should be displayed in hierarchical tree fashion.
    select 1, level, t3.title
    from t2, t3
    connect by prior t2.seq = t3.t2_seq and t2.t1_seq = 1
    start with t3.t2_seq IS NOT NULL;
    Thanks in advance,

    Hi,
    CONNECT BY queries operate on a table (or result set) where every row represents a node.
    In your tables, all the nodes on level 1 are in table t2, but all the nodes on level 2 are in table t3, so you have to do a UNION to make them all appear in a single in-line view.
    WITH
    u     AS
    (     -- Begin in-line view u, UNION of t2 and t3 as hierarchy
         SELECT seq     AS node_id,     -1     AS parent_id,     name          AS label
         FROM t2
         WHERE t1_seq = 1
    UNION ALL
         SELECT NULL     AS node_id,     t2_seq     AS parent_id,     '   ' || title     AS label
         FROM t3
    )     -- End in-line view u, UNION of t2 and t3 as hierarchy
    SELECT     label
    FROM     u
    START WITH     parent_id     = -1
    CONNECT BY     parent_id     = PRIOR node_id
    ;This assumes that -1 is never used as a key in your tables.
    Instead of using LEVEL and L- or RPAD to indent children under their parents, I relied on the fact that all the rows from the same table would be at the same, fixed LEVEL. It might be more efficient to continue that reasoning farther, and consider this problem not as a CONNECT BY query at all, but a master-detail query:
    WITH
    v2     AS
    (     -- Begin in-line view v2, relevant data from t2
    SELECT     seq          AS t2_seq
    ,     -1          AS t3_seq
    ,     name          AS label
    FROM     t2
    WHERE     t1_seq = 1
    )     -- End in-line view v2, relevant data from t2
    SELECT     label,                    t2_seq,     t3_seq
    FROM     v2
    UNION     
    SELECT     '   ' || title     AS label,     t2_seq,     seq AS t3_seq
    FROM     t3
    WHERE     t2_seq IN (SELECT t2_seq FROM v2)
    ORDER BY     t2_seq
    ,          t3_seq
    ;This second query produces the same lable column as the CONNECT BY query above, plus two other columns needed for sorting:
    LABEL             T2_SEQ     T3_SEQ
    mani                   1         -1
       manager             1          1
       clerk               1          2
    julia                  2         -1
       developer           2          3
       clerk               2          4
       salesman            2          5
       developer           2          8You can hide the extra columns with the SQL*Plus "COLUMN ... NOPRINT" command, or you can use another in-line view. (The sorting columns only have to be in the result set of the UNION query itselt.)
    In my results, julia appears with the developer role twice. That seems correct if table t3 includes both of these rows:
    3         2        developer
    8         2        developer

  • Hierarchical Trees: Creating and populating

    How would I go about it if was to have hierarchical trees and populate them with dynamic data that changes at runtime with the occurence of an event such as clicking of a button?
    I use Forms version 6.0.8.8.0.

    Did you read the documentation? It explains how to use hierarchical trees.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • Hierarchical Tree not showing using a record group to populate

    Hi, I am trying to set up an hierarchical tree. Can someone please give me the exact steps I need to take to get this right.
    I am trying to create a hierarchical tree to behave like a menu on a Main form from where I will call the other forms of my application.
    I have done the following
    select 1, level, null, form_name, form_name
    from iso_forms
    connect by prior form_name=action
    start with action is null
    and get this when I run the statement in pl/sql
    1 LEVEL NULL FORM_NAME FORM_NAME
    1 1 Edit Edit
    1 2 Holder Holder
    1 2 Isotopes Isotopes
    1 2 Laboratories Laboratories
    1 2 Personal Personal
    1 2 Incident Incident
    1 2 Equipment Equipment
    1 2 Over Exposure Over Exposure
    1 2 Archive Archive
    1 1 Print Print
    1 1 Queries Queries
    My tree on my main form is still blank, I have checked that the tree is the only item in the block but I am not sure how to confirm that it is a control block. I created the tree in layout editor by clicking on the Hierarchical Tree icon on the left and then dragging out a block, so I am assuming that the block is of the correct type.
    Thank you for your assistance
    Michael

    a control block is one not based on a table/view/procedure . check the block's query data source name. its must be blank.
    I suggest you create a procedure where you create the record_group using
    CREATE_GROUP_FROM_QUERY,populate_group and ftree.set_tree_property
    Here is my code that I i used to populate my tree .it works:
    PROCEDURE populate_the_tree IS
    grp recordgroup;
    error_number number;
    grpname varchar2(20) :='rg_group';
    tree_id item :=find_item('ctrl.tree');
    grp_qry2 varchar2(500) :='select -1,level,ename,null,empno from emp start with mgr is null connect by prior empno=mgr';
    begin
         grp := find_group(grpname);
         if not id_null(grp)
              then delete_group(grp);
         end if;
    --     grp := create_group_from_query(grpname,grp_qry1||grp_qry2);
         grp := create_group_from_query(grpname,grp_qry2);
         error_number:=populate_group(grpname);
         if error_number <> 0
              then message('Error while populating tree');
              raise form_trigger_failure;
         end if;
         ftree.set_tree_property(tree_id,ftree.record_group,grp);
    END;
    Message was edited by:
    lewismak2000

  • Hierarchical Tree Data Query/Record Group Question

    I need help with Hierarchical Forms right now. I'm currently trying to implement a hierarchical tree to display the different items in different categories. I have been reading up on it for the past few days, and i do not understand a few things.
    What is the difference between a data query and record group? they seem the same to me.
    How does the XX = prior XXX work? i understand that this is what connects the parent to the child.
    How do you determine what depth the node is? its done in the record group/data query, but how do i decide what level it is dynamically?
    Thanks a lot in advance!

    Thanks! I am unable to create a table specifically for the tree because i am using tables that have been ported live and are in use. My question about levels is how do I know which depth the node is. For example, i have a category called Information Technology and a category item called Business Informatics. I want to know how to decide that the Category(information technology) is on level 1 and the Item(business informatics) is on level 2.
    Information Technology
    |_
    Business Informatics
    And i do know how the Connect By XX = prior XXX works in the data query/record group.
    Thanks for your help!

  • 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 Icon Alignment

    Hi
    I am able to create and display a hierarchical tree with icons in the nodes okay. The default is that the icon is placed at the left of the node (like a folder icon on windows explorer). Is there any option to display icon at right side of node? I am unable to find any such option, but wish to confirm or seek other ideas.
    Thanks

    I think there is no option to display the icon in right side of the node. Even i tried to display only the icon without node label. And big icon (more then 16*16 pixel) with minimum of node label. If I succeed above two options then I might make an icon and label as a single image (even left icon right label or left label and right icon) and show it for a node.
    So by default for hierarchical tree icon will be displayed left side with Dimensions: 16 (height) * 16 (width) pixels.
    Regards
    Balaji.M

  • 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

  • Resume import

    I have an import operation that has been running for over 48 hours.   It is importing 400GB of photos/video.   I have a few questions.  One,  on import I selected the option to import folders as projects and the location of the files to be in Apertur

  • IPhone 3G Lack of compatibility with Alpine CDE-9852 car stereo system

    So I have a Alpine CDE-9852 car stereo system along with the Alpine iPod adapter in my 1994 Toyota Celica and I've come across a little problem ever since I upgraded to iPhone 3G. See, when I had my 2G iPhone and plugged it in via the dock connector,

  • Loss of signal aftrer 15 minutes with no use

    how do I cahnge settings to allow audio file sto continue without interuption?

  • Raw processing Elements 10

    I have Elements 10 which will not support RAW files from my Panasonic Lumix gm1. Is there an update to Elements 10 to do this or have I got to buy a new version of Elements which will support these files?

  • Can anyone point me in the right direction?

    Hi, I'm wondering if anyone would be able to point me in the direction of a tutorial using action script 2 on making an expanding menu system. Simular to this one http://www.gardaglobal.com/consulting.php?lang=en or this one http://flash-creations.co