Changes

Create iReport Templates with Subreports

561 bytes added, 14:27, 19 September 2013
Kinds of Subreports
''Figure 14. location_guid example''
</div>
 
To create a subreport using the Location relationship:
# From the main "Location" report, pass the location '''''guid''''' to the subreport in a parameter (e.g. in a parameter called '''ItemGUID''')
# Create a parameter on the subreport with the same name as in #1.
# In the subreport for the related item (e.g. a Victim) use the parameter in the following ImsmaQuery language syntax
location.guid="$P{parametername}"
 
This has the effect of limiting the subreport records to '''only those records that are associated to the location'''' from the main report.
===Link relationship subreports===
In addition to the Location relationship, the main items in {{IMSMANG}} can also be linked with one another during the reconciliation process. This is how, for example, Activities are linked with Land in the {{IMSMANG}} database. Accidents, land, activities, educations, assistances, QMs, and victims may be related to one another via ''links''. For example, a victim may be associated to an accident in a particular land. If these relationships are known, IMSMA users may define these links while reconciling the Data Entry Form. This special relationship can also be modeled in iReport using a report and subreport
 
The process for creating a report on an item and its linked items is similar to the process for creating a report on items with a Location relationship. The item in the main report is the primary item for which you would like to find linked items. The sub-report would return the records for the particular item that is linked to the primary item. The key difference is the query used in the sub-report.
319
edits