trabajar con trees, arboles jerarquicos

esperanza
25 de Noviembre del 2003
Hola, estoy intentando mostrar un arbol jerárquico de organismos, he probado a leerlo de un record group o escribir directamente la consulta de datos en el propio elemento de arbol, pero me da el siguiente error:
FRM-47321 Los datos utilizados para rellenar el árbol no son válidos.
en el w-n-f-i del elemento árbol pongo:
DECLARE
htree ITEM;
top_node FTREE.NODE;
find_node FTREE.NODE;
BEGIN
-- Find the tree itself.
htree := Find_Item('block9.organismos');

-- Populate the tree with data.
Ftree.Populate_Tree(htree);
--Ftree.Set_Tree_Property(htree,Ftree.RECORD_GROUP,'ORGANISMOS');
END;

mbejar
25 de Noviembre del 2003
hola
Te paso un ejemplo

htree ITEM;
v_ignore NUMBER;
rg_carga RECORDGROUP;
BEGIN
:SYSTEM.MESSAGE_LEVEL := 5;

-- Find the tree itself.
htree := Find_Item(\'block6.tree4\');

-- Check for the existence of the record group.
rg_carga := Find_Group(\'RG_a\');
/*** En el record grup RG_a tienes la select jerarquica
SELECT -1,
level,
cod_espacio
||\'-\'
||substr(pr_DESCRIPCION_idioma(cod_sede,cod_espacio,:parameter.idioma),1,200) descripcion,
cod_sede icono,
COD_ESPACIO
FROM tespacios
CONNECT BY
PRIOR NVL(COD_espacio,\'P\')=NVL(COD_ESPACIO2,\'P\')
START WITH NVL(cod_espacio2,\'P\')=\'P\'
Los campos de la select es importante que lo mires en la ayuda **/
-- Populate the record group with data.
v_ignore := Populate_Group(rg_carga);

-- 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_carga);
go_item(\'block6.tree4\') ;
end;

Un saludo, marco

Aldo
25 de Noviembre del 2003
usa navigator.populate_tree_with_query