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

Similar Messages

  • How do you create hierarchical folders in Forms Central to organize and manage multiple forms?

    How do you create hierarchical folders in Forms Central to organize and manage multiple forms?

    Hi,
    We do not support this feature right now.  Someone else has posted this to our ideas forum, here - http://forums.adobe.com/ideas/1587.  I suggest you vote for it, because we look at the popular ideas to help guide us on what new features work on.
    Thanks,
    Todd

  • 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

  • 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.

  • How can I create a Tree with Color Picker icons?

    I'm a newbie to Flex. I want to create a tree which has color
    picker icons.
    As an analogy for the Mac users out there, I envision a
    control like the Calendars section in iCal, where you can specify
    the color for each individual node. These colors are then used in
    other parts of the application.
    The Flex 3 documentation specifies four methods for setting
    node icons on a Tree control, none of which seems to suit my needs:
    -The folderOpenIcon, folderClosedIcon, and defaultLeafIcon
    properties
    -Data provider node icon fields
    -The setItemIcon() method
    -The iconFunction property
    In other words, I want to "setItemIcon" to an mx:ColorPicker,
    if that makes any sense.
    Is there a standard way of doing this? If not, how can I go
    about implementing such a control? Thanks in advance!

    well, Network UI should be used.

  • How can I create a Tree  Structure in java ??

    Hi,
    I want to create a tree structure(objects hierarchy) using java language. Is there any API method for this ?
    Can any one please give me a hint or suggestion how I can do this ??
    Thanks for the help in advance.

    Do you mean graphically?
    You can use a TreeSet or TreeMap if you just want to use tree structures.
    Kaj

  • How does one create hierarchical origanization in iPhoto

    OK, I'm stumped. I can create albums. That's about all.
    My photos are hierarchically organized on disc because they have to be in order to manage the volume. Yes, I can appreciate relational organization instead of hierarchical but in order to easily import the raw files first I need a place to put the photos and throwing them all in a single library makes it very hard to organize those photos afterwards. Relationships are created on the fly so I cannot predict what all possible relationships will be before I import the photos.
    Placing the photos initially in hierarchical order is at least space efficient because the flat album organization approach of iPhoto runs out of album listing space very fast and is totally unwieldy.
    It appears to me iPhoto goes directly from a flat file structure to a relational structure with nothing in between. Someone please tell me if there is some way for me to define hierarchical folders in iPhoto where I can dump my photos and then easily locate them later to define relational retrieval criteria (Events).
    Thanks.
    Michael

    Guys, I appreciate your comments.
    I got confused by the way iPhoto displays the small folder and album icons. They both looked the same to me. Well, the folders do behave like folders so I am OK now.
    Maybe Apple can use a different colour for albums and folders.
    I do understand relational databases and can see how Events behave similarly. Thanks very much - problem solved!
    Michael

  • How to output a hierarchical tree structure of existing data in XML using XSU

    I have data in a table where the rows have a parent-child relationship with each other. If one were to use the 'connect by' clause, one could see the tree (lets say some sort of a hierarchical family tree). If I were to use the XML-SQL Utility's PL/SQL API, how would it be possible to output the family tree in XML ie the XML should be such that each child element is nested within its parent element only.
    Thanks for the help.
    Jeet
    null

    XSU doesn't follow foreign key links like this, but our DBXML package (some sample code written in PL/SQL that we published a couple years back) does do this.
    See: http://technet.oracle.com/tech/xml/info/index2.htm?Info&plsxml/xml4plsql.htm

  • How can I create a tree hierarchy in Adobe Flash with WD Java?

    Hello!
    I've started to learning RIAs based on WD Java and Adobe Flash. Now I need to create application with tree hierarchy. Nodes of hierarchy must be able to collapse and expand. Hierarchy must looks like in https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0c91fc0-932d-2c10-4ca7-f5774950c8e3 (first section)
    Does anybody know where I can get a tutorial for such hierarhies or which control element I have use?
    regards, Lev

    well, Network UI should be used.

  • How can I create a tree tab for a flex asset definition ?

    I have several tabs in my content tree and I want to show specific tabs to users with specific roles.
    The problem is, for instance, the asset product has the subtype cellphone and the subtype tablets and I want to create a tab to show just cellphones to a users with role A and I want to create a tab to show just tablets to a users with role B.

    Hello,
    I don't think its just possible with UI, you will have to build a custom tree tab and add your own logic. Example is provided for proxy asset in guide, modify according to your requirement - http://docs.oracle.com/cd/E29542_01/doc.1111/e29634/proxy_assets.htm#WBCSD6369
    Added:
    Or you can use the same logic to add in your custom element as present in - OpenMarket/Gator/UIFramework/LoadOrphanNodes and OpenMarket/Gator/UIFramework/LoadOrphanChildrenNodes.
    In LoadOrphanChildrenNodes, there is this line - <ASSET.GETSUBTYPE TYPE="Variables.AssetType" OBJECTID="PList.assetid" OUTPUT="stype" />
    After this line you can add a check, if subtype = "SubtypeA", then proceed else not. Similarly, another element for the SubtypeB where you will have subtypeB check.
    After your custom element are ready, you can create tree tab with correct element selected and add the correct role.
    Regards,
    Guddu

  • How to create a tree structure using forms.

    Hi,
    How do i create a tree structure using oracle forms,i have a table named Functions and a specific column 'Function Name' should be displayed in the tree nodes.Can anyone help me out on how to create a tree structure and populating the nodes??
    thanks in advance
    Regards
    Karthik

    The FTree package provides functions to populate the tree - look for the topic "Manipulating a hierarchical tree at runtime
    " in the online help this point to all the functions and triggers

  • 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 ?.

  • Colourful Hierarchical Tree

    Hi,
    This is the first thread am posting. I searched ur discussions for "How to show the hierarchical tree in forms 10g with different colours and in different fonts weigth for different nodes". But i found nothing.
    Hopefully looking forward for your replies.

    You should use a less specific search string if you don't find anything first time but in this case it won't have helped you.
    You can set an icon for each node in the tree, which might be an acceptable alternative to writing lots of java.
    The icon can be set as a property
    http://www.oracle.com/webapps/online-help/forms/10g/topics/f1_help/builts/set_tree_node_property_built_in.html?tp=true
    or it can be built into the select statement that creates the tree (if your tree is query-driven).

  • Using hierarchical tree in developer 10g

    Hi all
    how can we use hierarchical tree in developer 10g any white paper will be helpfull
    thanks

    Hello
    <p>Here is a first sample<br>You could probably find others on this forum or by Googling<p>
    Francois

  • Create dynamic tree using swings

    how can i create dynamic tree ,the tree nodes are the folders in my c drive?
    thanks in advance

    to be honest, your question has been asked countless times already.
    use the 'search forums' box at left. some possible keywords
    JTree explorer files
    you should find plenty of sample code.

Maybe you are looking for

  • Blinking Icons

    Hello to all, I know there is animated gif support in swings, but I have an question. Imagine, java application, communicating throug corba ( 1 tink 12 Threads used for his coomunication:) splitted pane, with treem where each leaf has its onw animate

  • ITunes 10.2.1.1 Crashing in Windows 7 SP1 - My solution

    I will first start off and say my solution isn't the prettiest girl at the dance but it will get you what you want. Like most of you I spent the last couple weeks combing the Internet for answers but nothing works. iTunes would just stop working/cras

  • Import photos not working

    I am a computer dummy! I have had no trouble until now importing photos from my camera. When I connect my camera to computer a message appears - 'The disk you inserted was not readable by this computer' with options under this asking Initialize Ignor

  • Canon Full HD 1920 x1080

    Can any one tell me  the best way to import Full HD (1920 x 1080) footage from a canon 600D to use with premier pro please. As there is no preset for this.      Any knowledge of the best way and settings would be greatly appreaciated.

  • [SOLVED] Problem in getting a secondary null device

    Hi everybody! I need to have a null device in a chroot environment. I know that I could mount the /dev directory with "-bind" option, but I want to share only the essential. So I thought to create the null device with the following (typed as root): #