Set Report Parameter Lists in Tree View

<< Click to Display Table of Contents >>

Navigation:  Professional > Reports > How To >

Set Report Parameter Lists in Tree View

Using Items in Groups

Using Ungrouped Data


Note: Previous releases of EQuIS had a SQL query vulnerability that could be exploited by malicious users with access to the system.

Further details about the vulnerability are not provided here for security purposes, but are available upon request.


It is possible to make any report parameter that displays a list of selections (e.g., ST_REPORT_PARAMETER.DISPLAY_TYPE = 'SingleSelect' or

'MultiSelect') display a tree, instead of a list. To accomplish this, set the SELECT statement in ST_REPORT_PARAMETER.DATA_SOURCE as

described below.


Using Items in Groups


If you already have your items in a group (using RT_GROUP and RT_GROUP_MEMBER), then you may use the existing function in your SELECT

statement in the ST_REPORT_PARAMETER.DATA_SOURCE as follows:




Using Ungrouped Data


You can also present non-group data as a tree. To accomplish this, set ST_REPORT_PARAMETER.DATA_SOURCE such that it returns the exact same

seven output columns as the DBO.FN_GROUP_MEMBER_TREE function:

MEMBER_CODE: The code of the item (this is the value passed into the report).

MEMBER_DESC: The display text or description of the item (this is what the user will see).

GROUP_CODE: The code of the group (e.g. RT_GROUP.GROUP_CODE).

GROUP_DESC: The display text or description of the group (this is what the user will see).

GROUP_TYPE: The type of group (e.g. RT_GROUP.GROUP_TYPE).

DEPTH: The depth of the node in the resulting tree (used to organize the tree).

DISPLAY_ORDER: the order of the item within its parent.


Example 1


To display Action Levels in a tree organized by ACTION_LEVEL_TYPE, place the following SELECT statement in the DATA_SOURCE of the

@action_level_codes report parameter:




Note: Please add either /* group_members_tree */ at the beginning of the above DATA_SOURCE or --group_members_tree at the end of the DATA_SOURCE if the version of Professional/Enterprise is 6.3 or later. This note also applies to Examples 2 and 3 below.


Example 2


To browse locations in a tree organized by subfacility instead of as a list, find the @sys_loc_codes parameter and set the





Example 3


To browse locations in a tree organized by location type instead of as a list of locations, find the @sys_loc_codes parameter and set the






Loading the parameter tree may fail if member_code=member_desc=group_code, so try to avoid this extreme case.