Home » Developer & Programmer » Forms » why this tree didn't work correctly ? (db 10g , forms 6i , XP SP2)
icon5.gif  why this tree didn't work correctly ? [message #322229] Thu, 22 May 2008 18:52 Go to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

I attached the file , download it and test it.

I just made pushed button with when-button-pressed trigger :-

declare
	nn number;
	gg recordgroup;
begin

gg := CREATE_GROUP_FROM_QUERY('gg','select -1 , level , ename , null , empno 
from emp connect by prior mgr = empno 
start with emono = ( select min(empno) from emp )');
	
	nn:=populate_group(gg);
	
	ftree.set_tree_property('TREE4',ftree.record_group,'gg');
end;


and in run-time when I press the button give me that error :-
FRM-41072 : cannot create Group gg
and when I press OK give me this error:-
FRM-41076 : Error populate Group
and of course the tree didn't appear.

I just want to know what's the wrong here ?
  • Attachment: TREE.fmb
    (Size: 44.00KB, Downloaded 1017 times)
icon10.gif  Re: why this tree didn't work correctly ? [message #322465 is a reply to message #322229] Fri, 23 May 2008 11:38 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

well .... I think it's typo
Quote:
start with emono

it should be :-
Quote:
start with empno


but still don't work as I want , because not the full Hierarchical Tree appear for the whole emp table , it appear like this :-

http://img2.freeimagehosting.net/uploads/ac8a3d4ec0.png

what's missing here ?

I attached the same fmb after correcting for the typo.
  • Attachment: TREE.fmb
    (Size: 44.00KB, Downloaded 1059 times)
Re: why this tree didn't work correctly ? [message #322619 is a reply to message #322229] Sun, 25 May 2008 03:44 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

any suggests Question Exclamation Exclamation Rolling Eyes
icon10.gif  Re: why this tree didn't work correctly ? [message #322627 is a reply to message #322229] Sun, 25 May 2008 06:17 Go to previous message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

MR.wdorner told me :-

Quote:
Your query gives you the full staff only if the employee with the minimal empno anyhow is manager to all employees. If there is more than 1 "Top"-manager or if there are employess without manager these persons are not part of the tree.
Wolfram


so I modified my code from :-
start with emono = ( select min(empno) from emp )');
to
start with job=''PRESIDENT''');

and it's working now as I need ....... download the modified file to test my last result Very Happy
  • Attachment: TREE.fmb
    (Size: 44.00KB, Downloaded 1120 times)
Previous Topic: why I should press two click in the button in the Alert to execute the order ?
Next Topic: Doubt in Debuggin in Form 6i ?
Goto Forum:
  


Current Time: Sun Feb 09 23:43:25 CST 2025