SubReports
Logi developers often find a need to embed other reports inside their Logi reports, either as readily visible parts of the page or as hidden areas that are displayed on demand.
The following topics discuss use of the SubReport element:
- SubReport Attributes
- Using Embedded Mode
- Using IncludeFrame Mode
- Using IncludeFrameAsynch Mode
- Using a SubReport with More Info Row
About SubReports
A "subreport" in Logi parlance is an HTML page that's displayed inside a Logi report page. This could be a different Logi report page, a page from another Logi application, or even a page from an external website. The method discussed here for doing this uses the SubReport element.
Other available methods, which are not discussed here, include use of the Include Html File (see Insert HTML into Reports) element and our JavaScript-based Embedded Reports API
. For non-hierarchical tabular data, using a subreport with a Data Table is recommended instead of using a Subdata Table.
Let's look at two examples of the SubReport element in action:
In the first example, shown above, the subreport is the shaded area inside the dotted lines, embedded into the DevNet report page. DevNet is a Logi application and, in the example, the Support Plan Portal content (once upon a time a service provided by a third-party vendor) was embedded using a SubReport element. The embedded web pages, forms, and reports go right into the DevNet page. This technique allows us to maintain a consistent "look and feel" for the DevNet page while taking advantage of external web-based applications and services.
The secondexample, above, shows an Analysis Grid super-element that uses a child More Info Row (see Working with "More Info Rows") element to display detail data. Clicking the Order ID data causes a space to open in the table beneath the clicked row and a subreport, shown in the shaded area within the dotted lines, is displayed in it. The subreport consists of a separate Logi report definition that contains only a data table. One useful aspect of this technique is that it allows the subreport definition to be independently developed and tested, and then integrated into the Analysis Grid report definition. As we've seen, the SubReport element is capable of including a subreport that's either a separate HTML page from the same or another web site, or another Logi report definition. The functionality of any pages included is preserved, so data entry, links, video, etc. are all active. Several subreport modes are used for including files: Embedded,IncludeFrame, and IncludeFrameAsynch. These and the elements needed to create the two examples we've just seen are described in Using IncludeFrame Mode and Using IncludeFrameAsynch Mode.