Adding Cascading Drop-Down List Parameters

A cascading drop-down list is one with choices that change based on the value a user selects in another list field. In the following example, the Owners Site drop-down list parameter is a parent of the Device Owner drop-down list parameter.

Figure 1. Defining parameters for cascading drop-down lists
<PARAMETER>
  <DISPLAYNAME>Owners Site</DISPLAYNAME>
  <BINDNAME>ownerssite</BINDNAME>1
  <TYPE>DROPLIST</TYPE>       
  <DBLOOKUP>(select SiteName code, SiteName description 
    from sites) union (select '||||', 'All Sites' description ) 
    Order by description</DBLOOKUP>
</PARAMETER>
<PARAMETER>
  <DISPLAYNAME>Device Owner</DISPLAYNAME>
  <BINDNAME>owning</BINDNAME>2
  <TYPE>DROPLIST</TYPE>       
  <DBLOOKUP>(select DeviceInfo.Owner as code, Groups.GroupName 
    as description from DeviceInfo, Groups, Sites 
    Where Groups.GroupID = DeviceInfo.Owner and 
    Groups.Site = Sites.SiteID and DeviceInfo.Owner <> '' 
    and Sites.SiteName like replace(?,'||||','%%'))union 
    (select '||||', ' All Owners' description ) 
    Order by description
  </DBLOOKUP>
  <PARENT>ownerssite</PARENT>3
</PARAMETER>
  1. ownerssite is the name of the parameter in the RPT file.

  2. owning is the name of the parameter in the RPT file.

  3. Specifies that the parent list of owning is ownerssite.