Home » Developer & Programmer » Forms » hierarchical tree Problem (Developer 6I Database 10g Window XP)
hierarchical tree Problem [message #401761] Wed, 06 May 2009 06:38 Go to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Dear All

I Create a hierarchical tree on my form my record group query is

SELECT 1, LEVEL, item_Name,'',to_char(item_no) FROM ITEM2 CONNECT BY PRIOR item_no = CATAGORY_NO START WITH item_no in (1,2,3,4,5,6,7,8,9,10)


and My program unit query is

PROCEDURE p_populate_menu IS
tree4         ITEM;
my_tree       Number;	
BEGIN
       tree4 := Find_Item('block2.tree4');
       my_tree  := POPULATE_GROUP('tree_rg');
       Ftree.Set_Tree_Property(tree4, Ftree.RECORD_GROUP, 'TREE_RG');
END;


On when new form instrance



begin
	p_populate_menu;
	end;



The tree populate working fine but i need item_name and also item_no in this tree


The picture give you more idea about what i need
Re: hierarchical tree Problem [message #401945 is a reply to message #401761] Thu, 07 May 2009 02:13 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please search this forum for 'heirarchy tree'. There are numerous threads that contain my reference list. Compare what they have done with your form.

David
Re: hierarchical tree Problem [message #403198 is a reply to message #401761] Thu, 14 May 2009 02:58 Go to previous messageGo to next message
expertsudhir
Messages: 26
Registered: October 2008
Location: Delhi, India
Junior Member

concatenate the values in display part i.e. 3rd part, it will show.
SELECT 1, LEVEL, item_Name||'('||to_char(item_no)||')','',to_char(item_no) 
FROM ITEM2 
CONNECT BY PRIOR item_no = CATAGORY_NO 
START WITH item_no in (1,2,3,4,5,6,7,8,9,10)


try it and confirm.

[EDITED by LF: removed unnecessary quote of the whole OP's message. Applied [code] tags]

[Updated on: Thu, 14 May 2009 04:33] by Moderator

Report message to a moderator

Re: hierarchical tree Problem [message #403347 is a reply to message #401761] Thu, 14 May 2009 23:38 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Thanks a lot Sudhir


its work thanks a lot


well now i need when i right click the hierarchical tree its give me option edit,delete,new and when we click delete its delete the record from hierarchical tree and also from database

its is possible


Thanks & Regards


Shahzaib ismail
Re: hierarchical tree Problem [message #403349 is a reply to message #401761] Thu, 14 May 2009 23:49 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member


@ Sudhir


Why my tree not sorting with item_no i need to sort my tree with item_no


for example

01 
 1001
 1002
 1003
an as on 


Regards


Shahzaib
Re: hierarchical tree Problem [message #403361 is a reply to message #403349] Fri, 15 May 2009 01:05 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps because you didn't use ORDER BY clause?
Re: hierarchical tree Problem [message #403365 is a reply to message #403347] Fri, 15 May 2009 02:08 Go to previous messageGo to next message
expertsudhir
Messages: 26
Registered: October 2008
Location: Delhi, India
Junior Member

Create popup menu and add it in property of hierarchical tree.
write code on the menu items.


shahzaib_4vip@hotmail.com wrote on Fri, 15 May 2009 10:08
Thanks a lot Sudhir


its work thanks a lot


well now i need when i right click the hierarchical tree its give me option edit,delete,new and when we click delete its delete the record from hierarchical tree and also from database

its is possible


Thanks & Regards


Shahzaib ismail

Re: hierarchical tree Problem [message #403370 is a reply to message #401761] Fri, 15 May 2009 02:54 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
WHEN I USER ORDER BY CLAUSE

SELECT 1, LEVEL, item_Name||'    ('||to_char(item_no)||')    ','',to_char(item_no) 
FROM ITEM2 
CONNECT BY PRIOR item_no = CATAGORY_NO 
START WITH item_no in (1,2,3,4,5,6,7,8,9,10)
ORDER BY ITEM_NO


ITS GIVE ME RESULT LIKE THIS

GENERAL ITEM (1)
SPARE PARTS (2)
NEEDLE (3)
  CLIPPER (1001)
  TAG PIN (1002)
  FOLDER (2001)
  MIX SPARE (2002)
  DB*1 # 18 (3001)
  DB*1 # 19 (3002)



WHY ITS NOT SORTING LIKE THIS

GENERAL ITEM (1)
  CLIPPER (1001)
  TAG PIN (1002)
SPARE PARTS (2)
  FOLDER (2001)
  MIX SPARE (2002)
NEEDLE (3)
  DB*1 # 18 (3001)
  DB*1 # 19 (3002)
    



REGARDS

SHAHZAIB ISMAIL
Re: hierarchical tree Problem [message #403378 is a reply to message #401761] Fri, 15 May 2009 04:27 Go to previous message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Thanks Sudhir

you told me

Create popup menu and add it in property of hierarchical tree.
write code on the menu items.


i make popup menu with report now i need to show my report when i right click and click of report and

my report also contain with one parameter which is item_no so what will i write in pl/sql of report ?

for example i need stock report only for the selected item_no of tree


Hope you understand


Regards

Shahzaib ismail



Previous Topic: Delete Trigger in Form Runtime
Next Topic: Creating a Record
Goto Forum:
  


Current Time: Wed Dec 07 20:36:27 CST 2016

Total time taken to generate the page: 0.11529 seconds