Tree view represents parameter values in hierarchical form. This provides the user more information about the parameter value.
|Text box view
In the view, while users can view the parameter values (as last item in the hierarchy – leaf), they are also able to view other information about the parameter value. In this example, users are able to view the state and country in which a city is located.
Figure 12: Tree Type Parameters
Check Tree View tab header checkbox to enable the area and work on it.
Following type of tree views are available to choose from:
- Flat: Select this when you are using a flat database structure. When Flat is selected, the leaf is set as Display Column under Dropdown Source. Nodes are set under Tree View Details. For example, for a three level tree, you will set two levels in Tree View Details and third in Dropdown Source. Make sure the SQL used to get parameter retrieves all the fields required to create the tree.
- Hierarchical: Select this when the database has hierarchical relationship. In Oracle, for example, when database has hierarchical relationship, the SQL uses Start with and connect by clause.
In case of Hierarchical, the query should return:
- NODEID: Unique identification value of the node.
- PARENTNODEID: Unique identification value of current node.
- NODLEVEL: A number indicating node level of current node.
- NODEVALUE: Actual value of node.
Example query for Oracle
select child “NODEID”,parent “PARENTNODEID”,level “NODELEVEL”,child “NODEVALUE”
start with parent is null
connect by prior child = parent
When Flat is selected,
- In the first row of LEVELS, select the field that should appear topmost in the tree view.
- To have second branch, set the fields in second row.
Similarly, add more branches if required. Click to add a row. Click to delete respective row.
At report run time, dual list will be presented to the user to select from. User will be able to select
- One or multiple child nodes under a parent (for ‘multi-select’ parameters)
- Parent node along with child nodes
- Parent node without having need to select child node
Note: Tree view is not available for Search.
The below screen appears upon running the report with Tree type parameters.
Figure 13: Tree Type Parameters on IPF