Sub-reports are a feature of the System Architect reporting system introduced specifically for System Architect Publisher. You can use sub-reports to generate a report page that not only includes information on a particular artifact (Diagram, Symbol, or Definition), but also complete reports on its properties. For example, a typical report for a Class definition lists its attributes and methods, and for each attribute and each method, a link is provided to a page that contains a full report on each attribute and method. Using sub-reports, you can create a Class definition report that has an Attribute sub-report and a Method sub-report, so that all information is presented on one page. In this lesson you add a sub-report.
An example of such a report is shown in the figure below.
To add a sub-report
1 If you want to have your report include sub-reports, add the SUBREPORT statement to the main report while you are editing it in text mode (not through the reporting system’s graphical user interface).
2 Use the code below (which reflects the figure above) as an example.
REPORT "Class Report"
ID 53008
{
SETTING { PAGESIZE -1", 0.00 }
SETTING { REPORTFORMAT 4 }
FIELD "Description <- Description" { SOURCE PROPERTY "Description" LENGTH 500 TYPE MEMO LEGEND "Description" }
FIELD "Stereotype <- Stereotype" { SOURCE PROPERTY "Stereotype" LENGTH 20 TYPE CHARACTER LEGEND "Stereotype" }
FIELD "Package <- Package" { SOURCE PROPERTY "Package" LENGTH 90 TYPE CHARACTER LEGEND "Package" }