tree in oracle 6i [message #432452] |
Tue, 24 November 2009 05:41 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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'
|
|
|
|