7 Replies Latest reply on Aug 14, 2006 6:31 PM by EddieR

    Htree data display problem...

    527908
      hi...
      i have 1 datablock having ID field of 1 table... On the layout wizard i have added Htree item.... also i have 1 recordgroup ..
      i have set record group property of HTree to my recordgroup..so why it is not showing any data....
      i am getting folowing msg when i run the form.....

      FRM-32089: Trees must be in single row, single item blocks.
      Hierarchical Tree Item TREE1
      Item: TREE1
      Block: REGION
      Form: HTREE
      FRM-30085: Unable to adjust form for output.
        • 1. Re: Htree data display problem...
          518928
          Trees must be in single row, single item blocks.

          Your Block: REGION should not contain any other item then TREE1.

          For other items create other block.
          • 2. Re: Htree data display problem...
            Gerd Volberg
            do what the errormessage sais to you:

            create the htree only in a "single-row" block (this is a blockproperty)
            don't create additional items in that block
            • 3. Re: Htree data display problem...
              527908
              now its not showing that message.... but again its only displaying 2 scrollbars.. and no data
              • 4. Re: Htree data display problem...
                527908
                on when-new-form-instance, i have following code.....

                DECLARE
                htree ITEM;
                rg_data RECORDGROUP;
                BEGIN
                -- Find the tree itself.
                htree := Find_Item('tree1');

                -- Find the record group.
                rg_data := FIND_GROUP('RG1');

                -- Add the new node at the top level and children.
                Ftree.Add_Tree_Data(htree,
                Ftree.ROOT_NODE,
                Ftree.PARENT_OFFSET,
                Ftree.LAST_CHILD,
                Ftree.RECORD_GROUP,
                rg_data);

                END;
                ....no error but and getting the message instatus bar "Data used to populate the tree is invalid" after running the form and just 2 scrollbars...plz hellllllpppppppp
                • 5. Re: Htree data display problem...
                  484825
                  check your query for the record group
                  • 6. Re: Htree data display problem...
                    527908
                    query is very simple....
                    its like...
                    select * from tabname;
                    • 7. Re: Htree data display problem...
                      EddieR
                      The online help isn't much use if you don't already know the form the query should take. Perhaps if it were in the Populating a Tree of Creating a Tree examples there would be less confusion. It appears in the help for the Set_Tree_Property procedure but is not explained there.

                      The query they use is

                      'select 1, level, ename, NULL, to_char(empno) ' ||
                      'from emp ' ||
                      'connect by prior empno = mgr ' ||
                      'start with job = ''PRESIDENT'''

                      The 5 columns you need to select, in this order, are
                      1) Node State: either 1 or -1, to set the node as expanded or collapsed (not necessarily in that order)
                      2) Level: the level in the hierarchy
                      3) Label: the node's label, visible in the tree
                      4) Icon: the icon to be displayed, or NULL for no icon
                      5) Value: an arbitrary character value to apply to the node. It isn't visible to the user but you can get the Value at runtime in your code. Use this to store the primary key of the record represented by the node if you want to be able to manipulate that record or query child records when the node is selected.