Home » Developer & Programmer » Forms » tree in oracle 6i (XP)
icon5.gif  tree in oracle 6i [message #432452] Tue, 24 November 2009 05:41 Go to next message
nassersoltani
Messages: 1
Registered: November 2009
Location: Tehran
Junior Member
hello
i am using below code to view a tree, but nothing appears in the tree! what is the problem.
the table is not empty.

-- This code could be used in a WHEN-NEW-FORM-INSTANCE
-- trigger to initially populate the hierarchical tree
-- with data.

DECLARE
htree ITEM;
v_ignore NUMBER;
rg_emps RECORDGROUP;
BEGIN
-- Find the tree itself.
htree := Find_Item('TREE_BLOCK.tree1');

-- Check for the existence of the record group.
rg_emps := Find_Group('emps');
IF NOT Id_Null(rg_emps) THEN
DELETE_GROUP(rg_emps);
END IF;

-- Create the record group.
rg_emps := Create_Group_From_Query('rg_emps',
'select 1,level ,MODULE_NAME_FARSI ,null,to_char(CODE) ' ||
'from forms ' ||
'connect by prior code=FORMS_CODE ' ||
'start with code=1');


-- Populate the record group with data.
v_ignore := Populate_Group(rg_emps);

-- Transfer the data from the record group to the hierarchical

-- tree and cause it to display.
Ftree.Set_Tree_Property(htree, Ftree.record_group,rg_emps);
--ftree.populate_tree(htree);
END;
Re: tree in oracle 6i [message #432472 is a reply to message #432452] Tue, 24 November 2009 07:02 Go to previous messageGo to next message
gurupatham
Messages: 66
Registered: March 2008
Location: Chennai
Member
First check whether the given Query is returns row or not even though having data in the table.

Or Check it throws any errors?

Or Try with Create_Group_From_Query('emps' instead of Create_Group_From_Query('rg_emps'

Re: tree in oracle 6i [message #433375 is a reply to message #432452] Wed, 02 December 2009 00:14 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have a look at the following for handling trees:

Hierarchy Tree
A form with table definition.
http://www.orafaq.com/forum/t/77009/0/unread/67467/#msg_229389
Another form.
http://www.orafaq.com/forum/m/215628/67467/?srch=tree#msg_215628
And another
http://www.orafaq.com/forum/t/83541/67467/
And
http://www.orafaq.com/forum/t/83923/67467/
and from 2005
http://www.orafaq.com/forum/t/32866/67467/
and from 2006
http://www.orafaq.com/forum/m/182182/88695/#msg_182182 and http://www.orafaq.com/forum/mv/msg/66243/182609/67467/#msg_182609
and from 2009
http://www.orafaq.com/forum/t/138935/67467/
Populate Nth level of Hierarchical tree
http://www.orafaq.com/forum/t/87093/67467/
Icons
http://www.orafaq.com/forum/m/215770/67467/?srch=TRIGGER_NODE#msg_215770
Change the icon on a node.
http://www.orafaq.com/forum/t/90909/67467/
Show Image In Tree
http://www.orafaq.com/forum/t/95682/67467/
FTREE Documentation - Metalink Note:210663.1
Microsoft TreeView
http://www.orafaq.com/forum/t/142064/67467/

Are you sure 'connect by prior code=FORMS_CODE ' works in the PL/SQL that is supported by Forms 6i?

David
Previous Topic: HOW TO RESTRICT TEXT ITEM INPUT
Next Topic: FRM-92101 Error using Webutil
Goto Forum:
  


Current Time: Thu Dec 08 01:53:01 CST 2016

Total time taken to generate the page: 0.14393 seconds