Like embedded forms, reports can include links to Sub-Reports, or other reports defined within the account. Sub-reports typically open in a modal window, like info panels or embedded forms, and can only be connected using internal links within table columns or map elements, or using View commands. This approach provides the convenience of being able to view a sub-report without having to leave the page of the original report, though it does provide a very narrowly focused view of the child report. In particular, only a single view of a sub-report can appear within a modal window, so when you create a Sub-Report link, you must not only select a report form those defined in the account, but you must also select a single view. Additionally, if the nested report contains any links of its own, those links are disabled, to maintain the paradigm of only having a single modal window open at once. Where the caption of the modal window displaying an embedded form will always be the name of that form, a sub-report link stores an optional Caption attribute that overrides the name of the sub-report, if present.
As the other views of a sub-report are hidden within a modal window, so too are the criteria of the sub-report that a user would normally be able to use to filter the results of the query. However, when defining a sub-report link, you can define Criteria Mappings that automatically populate the criteria of the sub-report using values from the parent report. Creating mappings for a sub-report is more complicated than doing so for an embedded form, however, since most types of report criteria can use different comparison operations; for example, when using a criterion on a Text field, a user can select results that exactly match a given value, that do not match a given value, that contain a value, or that simply start with a certain string. As a result, the Criteria Mappings section of the link builder lists all criteria defined in the sub-report, and for each, allow you to select both a comparison operation (based on the data type of the criterion field) as well as a value against which to compare the criterion.
The Redirect flag of a sub-report link provides another method of visualizing that sub-report. Instead of opening a sub-report in a modal window when the user clicks a link, the system will instead redirect the user away from the parent report entirely, to the View Report page for the child report. This approach loses much of the convenience of having a sub-report in the first place, but makes up for it with additional functionality. The user can access all the views of the sub-report when redirected to its own page, though the system will initially direct them to the view specified in the sub-report link. Any criteria mappings defined in the link are still applied, and those criteria are then hidden from the user so they may not make changes to them. Any unmapped criteria (that are not marked as "Hidden" by default) appear on the left filter as normal, however, and the user may use them to filter the results of the sub-report. Lastly, all links and commands of the sub-report remain active using this approach.
The Governed flag of a sub-report link helps provide efficiency in the very specific case that a parent report selects from a process type, and where you want to include a sub-report that selects from an activity type included within the parent process type. When this flag is checked, a sub-report will not be executed as an independent query on the system's underlying database; instead, the system will take all activity records belonging to the selected parent process -since only internal links or View commands can connect to sub-reports, there will always be a selected query result- and execute the sub-report only on those records.