Use of hierarchical tree in Oracle9i forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • balabantaray
    New Member
    • May 2007
    • 1

    Use of hierarchical tree in Oracle9i forms

    How to use Hierarchical Tree,OCX ActivX acomponents in Oracle9i Forms. Will any body help me with some example source code, so that I can use it in my practice project.
  • DeMan
    Top Contributor
    • Nov 2006
    • 1799

    #2
    Hi balabantary,

    Welcome to thescripts. I'm sure you'll find a wealth of information here. You'll notice links to various forums and discussions on the blue bar at the top of the screen. In the meantime I am moving your post to the Oracle forum (I'm sure the experts there a better qualified to address your query).

    Comment

    • subhashsavji
      New Member
      • May 2007
      • 1

      #3
      Originally posted by balabantaray
      How to use Hierarchical Tree,OCX ActivX acomponents in Oracle9i Forms. Will any body help me with some example source code, so that I can use it in my practice project.
      create one non database block e.g. tree_block then
      add hieraachical control item in that. e.g htree
      create record group fron record group node e.g. htree_rg
      select 1, level, ename,NULL,TO_C HAR(empno)
      from emp
      start with mgr IS NULL
      connect by prior empno = mgr
      //
      and apply this record group to htree hierarchiacl tree through property pallet.
      //

      trigger at tree_block name is WHEN_TREE_NODE_ SELECTED
      DECLARE
      v_htree ITEM;
      node_value VARCHAR2(100);
      BEGIN
      Message('Workin g... (0%)'|| :SYSTEM.TRIGGER _NODE, NO_ACKNOWLEDGE) ;

      -- Find the tree id.
      v_htree := Find_Item('tree _block.htree');

      -- Find the value of the node clicked on.
      -- The SYSTEM.TRIGGER_ NODE environment variable is the node the user
      -- clicked on.
      node_value := Ftree.Get_Tree_ Node_Property(v _htree,
      :SYSTEM.TRIGGER _NODE, Ftree.NODE_VALU E);

      -- Modify the Where Clause in the EMP Block.
      SET_BLOCK_PROPE RTY('emp', DEFAULT_WHERE, 'empno = ' || node_value);
      GO_BLOCK ('emp');
      EXECUTE_QUERY;
      END;
      /


      ADD TRIGGER WHEN-NEW-FORM-INSTANCE AT FORM LEVEL
      DECLARE
      rg_num NUMBER;
      v_htree ITEM;
      BEGIN
      rg_num := POPULATE_GROUP( 'htree_rg');
      v_htree := FIND_ITEM('tree _block.htree');
      FTREE.POPULATE_ TREE(v_htree);
      END;
      //


      note :- at every level fire one trigger on-error if you get error coding is
      null;

      Comment

      • Syed Adeel Ali

        #4
        Thanks .. :)

        Comment

        Working...