Difference between revisions of "Use iReport"

From IMSMA Wiki
Jump to: navigation, search
(How To Use This Manual)
 
(52 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
__FORCETOC__
 +
{{TOC right}}
 
{{HowTo's
 
{{HowTo's
|[[HowTo:Start and Configure i-Report|Start and Configure i-Report]]
+
|[[Start and Configure iReport]]
|[[HowTo:Create a Basic i-Report Template|Create a Basic i-Report Template]]
+
|[[Create a Basic iReport Template]]
|[[HowTo:Create i-Report Templates with Subreports|Create i-Report Templates with Subreports]]
+
|[[Modify an iReport Template]]
|[[HowTo:Summarize i-Report Template Data|Summarize i-Report Template Data]]
+
|[[Format an iReport Template]]
 +
|[[Create iReport Templates with Subreports]]
 +
|[[Summarize iReport Template Data]]
 
}}
 
}}
  
==Introduction==
+
==Introduction to iReport==__NOEDITSECTION__
===i-Report===
+
iReport Designer (also known as iReport) is a third-party application that allows you to generate custom-defined reports on IMSMA data. Using iReport, you may define the attributes that are returned by a report and also customise the appearance of the report. Report templates designed in iReport can be imported into {{IMSMANG}} and run by {{IMSMANG}} users to extract data based on search criteria. Reports can be exported to PDF, RTF, XLS, and other formats. iReport Designer version 5.0.1 is included with the {{IMSMANG}} distribution. Using iReport Designer, users create .jrxml iReport templates, a kind of xml report definition, that can be used by {{IMSMANG}} to [[Producing Reports Using IMSMANG|produce a formatted report]].
iReport is a third-party application that allows you to generate custom-defined reports on IMSMA data. Using iReport, you may define the attributes that are returned by a report and also customise the appearance of the report.
 
===How To Use This Manual===
 
This guide provides information for using iReport with IMSMA. It provides the steps for configuring and using iReport to report on IMSMA data. It is not intended to serve as a complete guide for using iReport. For detailed information on using iReport, refer to the iReport help or documentation.
 
  
===Conventions===
+
{{note|iReport does not support Java 8.}}
<u>Table 1</u> lists the conventions used in the manual.
 
<center>
 
{| class="wikitable" width="500"
 
|-
 
| align="center" colspan="2" | '''Table 1. Conventions'''
 
|-
 
| width="100pt" | '''Convention'''
 
| align="center" width="400pt" | '''Meaning'''
 
|-
 
| ''Bold'' || Indicates menu, button, icon, or list names.
 
|-
 
| ''[Bold in brackets]'' || Indicates a keyboard key.
 
|-
 
| ''Italics'' || Indicates text that should be typed exactly as it is shown in the user manual into a field. Italicized text is also used to note options that may be selected from a list.
 
|-
 
| [[Image:Note.jpg|40px]] || Indicates a tip for using IMSMA.
 
|-
 
| [[Image:Warning.jpg|40px]] || Indicates steps for completing a task.
 
|-
 
| [[Image:MobilePen.png|40px]] || Indicates an error that you might encounter.
 
|}
 
</center>
 
  
==Sample Reports==
+
==iReport Basics==__NOEDITSECTION__
IMSMA includes several iReport sample reports. These reports may be used as is or used as a reference to create your reports. The sample reports are installed in the \iReports\IMSMA reports directory of your IMSMA installation directory.
+
iReport uses standard reporting terms to refer to the basic building blocks of report templates.
 
+
===Data Sources===__NOEDITSECTION__
=== Article 7: Form A===
+
Data sources in iReport refer to the connection between the report template and the {{IMSMANG}} database. Each iReport template will have one data source. Data sources in iReport generally refer to items in {{IMSMANG}} such as Land, Activity, Education, Accident, Victim, etc. Available data sources include:
The ''Article 7: Form A'' report returns the total area size of all reductions that are being reported on, the total area size of all hazards that have been linked to the reported reductions, and a count of all victims that have been linked to the reported reductions. If a search definition is associated with the report, the search definition name will be displayed in the report title.
+
{| class="wikitable" style="margin: 1em auto 1em auto;"
 
+
|+Available Data Sources
[[Image:fig41SampleReport.png|center|500px|''Figure 41. Sample report - Article 7 form A'']]
 
<div align="center">
 
''Figure 41. Sample report - Article 7 form A''
 
</div>
 
 
 
====Table 6====
 
{| class="wikitable"
 
 
|-
 
|-
| File name || Article 7 Form A.jrxml
+
| Accident Device ||MRE  
|-
 
| Data source|| Hazard reduction
 
|-
 
| Variables  
 
|| Sum of hazard reduction area size
 
Sum of total hazard area size
 
Sum of victim counts
 
|-
 
| Derived fields
 
|| HazreducLinkedHazardAreaSize (Total Hazard Area Size)
 
HazreducLinkedVictimCount (Victim Count)
 
|-
 
| Sub-reports|| None
 
|}
 
 
 
===Article 7: Form C===
 
The ''Article 7: Form C'' report returns a crosstab by district and hazard with the number of hazards by hazard type.
 
 
 
[[Image:Article 7FormC.png|center|500px|''Figure 42. Sample report- Article 7-form C'']]
 
<div align="center">
 
''Figure 42. Sample report – Article 7 form C''
 
</div>
 
 
 
====Table 7====
 
{| class="wikitable"
 
 
|-
 
|-
| File name|| Article 7 Form C.jrxml
+
| Accident ||MRE Detail
 
|-
 
|-
| Data source|| Hazard
+
| Assistance Classification ||Needs Assessment Classification
 
|-
 
|-
| Variables|| REPORT_COUNT (built-in iReport variable)
+
| Cause Classification ||Ordnance
 
|-
 
|-
| Derived fields|| None
+
| Field Report ||Organisation
 
|-
 
|-
| Sub-reports|| None
+
| Gazetteer ||Place
|}
 
 
 
==Bar Chart Sample==
 
The ''Bar Chart'' sample report returns the metal contamination level of hazards and area size. The report includes a bar chart which summarizes the total area size of hazards by their metal contamination level.
 
 
 
[[Image:BarChartSample.png|center|500px|''Figure 43.'' ''Sample report- Bar chart'' '']]
 
 
 
====Table 8====
 
{| class="wikitable"
 
 
|-
 
|-
| File name|| Bar Chart Sample.jrxml
+
| Geopoint ||QM
 
|-
 
|-
| Data source|| Hazard
+
| Geospatialinfo ||Question
 
|-
 
|-
| Variable
+
| Hazard ||Received MRE
|| Sum of area size
 
Count of metal contamination level
 
 
|-
 
|-
| Derived fields|| None
+
| Hazard Device ||Task
 
|-
 
|-
| Sub-reports|| None
+
| Hazard Reduction ||Victim
|}
 
 
 
==Clearance by Year and District==
 
The Clearance by Year and District report returns the total area cleared, hours spent, devices, and number of positive samples grouped by year and district.
 
 
 
[[Image:Clearance Operaitons by Year and District.png|center|500px|''Figure 44. Sample report-Clearance by year and district'']]
 
 
 
====Table 9====
 
{| class="wikitable"
 
 
|-
 
|-
| File Name|| Clearance by Year and District Sample.jrxml
+
| Hazard Reduction Device ||Victim Assistance
 
|-
 
|-
| Data source|| Hazard reduction
+
| Impact Survey ||Victim Assistance Assistance
 
|-
 
|-
| Variables|| Count variables for all the derived fields
+
| Interviewee ||Victim Cause
 
|-
 
|-
| Derived fields
+
| Link ||Victim Needs Assessment
|| One derived field for each device sub-category (i.e., Anti-Tank, Anti-Vehicle, etc.,) created by using parameterized derived field com.fgm.imsma.ext.report.OrdnanceWithSubCategoryExists, passing in the device subcategory imsma enum.
 
 
|-
 
|-
| Sub-reports|| None
+
| Location ||Work Item
|}
 
  
==Hazards by Ordnance Type==
 
The Hazards by Ordnance Type report shows summary data based on the full set of Ordnance Types present.  This report groups Hazards based on the full list of Ordnance SubCategories that are found on the Hazard.  The report displays the name of the search in the report title.
 
 
[[Image:MRE audience.png|center|500px|''Figure 45.'' ''Sample report- Hazard by ordnance type'']]
 
 
====Table 10====
 
{| class="wikitable"
 
|-
 
| File name || Hazards by Ordnance Type.jrxml
 
|-
 
| Data source|| Hazard
 
|-
 
| Variables
 
|| Count of hazards for each ordnance sub-category
 
Sum of area size,
 
Average of area size
 
|-
 
| Derived fields || HazardOrdnanceSubCategoryList (Ordnance SubCategory List)
 
|-
 
| Sub-reports|| None
 
 
|}
 
|}
  
==MRE Audience Totals by Age==
+
The iReport datasource management and selection window can be found just below the menu bar in iReport Designer.
The MRE Audience Totals by Age report lists the different age categories of MRE audiences and the total number of male, female, and unknown gender in each age category.
+
[[Image:IReport Datasources Window.png|center|500px|''Datasource selection window'']]
 
+
<div align="center">
[[Image:MRE audience.png|center|500px|''Figure 46.'' ''Sample report- MRE audience totals by age'']]
+
''iReport Datasource Selection Window''
 +
</div>
  
====Table 11====
+
===Fields===__NOEDITSECTION__
{| class="wikitable"
+
Fields in iReport refer to individual IMSMA data elements that are available from a data source. Fields are denoted in iReport using the following syntax '''''$F{fieldname}''''' (e.g. '''''$F{guid}'''''). Each data source contains a list of available fields.
 +
===Variables===__NOEDITSECTION__
 +
Variables in iReport are created within the iReport template to manipulate or calculate data. Using variables, users can create calculations such as sums, counts, averages, or other totals. Variables are denoted in iReport using the following syntax '''''$V{variablename}''''' (e.g. '''''$V{SumAreaSize}'''''). Variables can use field and/or parameter data.
 +
===Parameters===__NOEDITSECTION__
 +
Parameters in iReport are used to accept and transfer external information, such as information from another report. Parameters are denoted in iReport using the following syntax '''''$P{parametername}''''' (e.g. '''''$P{ParentGuid}''''')
 +
===Bands===__NOEDITSECTION__
 +
Bands are used in iReport to specify areas on the resulting report. Each band acts differently in a report. The most used bands in iReport are:
 +
{| class="wikitable" style="margin: 1em auto 1em auto;"
 
|-
 
|-
| File name  || MRE Audience by Age.jrxml
+
! Band Name !! Use
 
|-
 
|-
| Data source|| MRE Details
+
| Title || Displayed once at the beginning of the report
 
|-
 
|-
| Variables
+
| Column or Group Header || Displayed at the top of each page or section
|| Sums of each gender (derived fields) by group and report
 
Sum of total audience by group and report
 
Count of number of events (MRE Details) by group and report
 
 
|-
 
|-
| Derived Fields
+
| Detail || Displayed once for each data row returned by the report. Most often data elements will exist in this band.
|| MREDetailMaleAudience (Total Male Audience)
 
MREDetailFemaleAudience (Total Female Audience)
 
MREDetailUnknownAudience (Total Unknown Audience)
 
 
|-
 
|-
| Sub-reports|| None
+
| Summary || Displayed once at the end of the report. Useful for charts, crosstabs, and totals.
 
|}
 
|}
  
==Pie Chart Sample==
+
===Groups===__NOEDITSECTION__
The Pie Chart sample report returns the metal contamination level of hazards and area size. The report includes a pie chart which summarizes the total area size of hazards by their metal contamination level.
+
Groups in iReport are used to display records with one or more common values together on a report. For example, Land with the same value for "Province" could be grouped together in a report. Groups can be added in the iReport Wizard or after a report has been created.
 
+
===Subreports===__NOEDITSECTION__
[[Image:Pie Chart.png|center|500px|''Figure 47.'' ''Sample report- Pie chart'']]
+
Subreports are used in iReport to include more than one data source in a report. For example, to include information about Activities performed on a particular Land, you would include an Activity subreport in the Land report.
 
+
===Crosstabs, Charts, and Formatting Elements===__NOEDITSECTION__
====Table 12====
+
In addition to the iReport elements addressed above, additional specialized iReport elements are available to include in iReport templates including Crosstabs, Charts, and additional formatting elements such as lines, rectangles, etc. Crosstabs and chart elements typically belong only in the Summary band of a report while formatting elements including images can be included anywhere within the report template.
{| class="wikitable"
 
|-
 
| File name || Pie Chart Sample.jrxml
 
|-
 
| Data source || Hazard
 
|-
 
| Variables
 
|| Sum of area size
 
Count of metal contamination level
 
 
 
|-
 
| Derived fields || None
 
|-
 
| Sub-reports|| None
 
|}
 
 
 
==Accident Victim Summary Report==
 
The Accident Victim Summary report lists accidents and the victims that are linked to them. In this example, the victim data is linked to the accident and returned via a sub-report. For this type of report, compile the sub-report (Sub-reports\Summary_AccidentVictim_sub-report0.jrxml) before attempting to run the main report.
 
 
 
Set the SUB-REPORT_DIR parameter to .\Sub-reports\.
 
[[Image:Accident Victim.png|center|500px|''Figure 48.'' ''Sample report- Accident victim summary'']]
 
 
 
====Table 13====
 
{| class="wikitable"
 
|-
 
| File name|| Summary_AccidentVictim.jrxml
 
|-
 
| Data source
 
|| Accident
 
Query executor (used by victim sub-report)
 
|-
 
| Variables
 
|| Sum of area size
 
Count of metal contamination level
 
|-
 
| Derived fields|| None
 
|-
 
| Sub-reports|| Sub-reports\Summary_AccidentVictim_sub-report0.jrxml
 
|}
 
 
 
==Hazard Summary Report==
 
File: Summary_Hazard.jrxml
 
Data source: Hazard
 
 
 
[[Image:Hazard Summary.png|center|500px|''Figure 49.'' ''Sample report- Hazard summary'']]
 
 
 
===Hazard Reduction Summary Report===
 
File: Summary_Hazreduc.jrxml
 
Data source: Hazard Reduction
 
[[Image:Hazard Reduction.png|center|500px|''Figure 50.'' ''Sample report- Hazard reduction summary'']]
 
 
 
===Location Summary Report===
 
File: Summary_Location.jrxml
 
Data source: Location
 
[[Image:Location Summary.png|center|500px|''Figure 51.'' ''Sample report- Location summary'']]
 
 
 
==MRE Summary Report==
 
For this type of report, compile the sub-report (Sub-reports\Summary_Mre_sub-report1.jrxml) before attempting to run the main report.
 
 
 
Set the SUB-REPORT_DIR parameter to .\Sub-reports\.
 
[[Image:MRE Summary.png|center|500px|''Figure 52.'' ''Sample report- MRE summary'']]
 
 
 
====Table 15====
 
{| class="wikitable"
 
|-
 
| File name|| Summary_MRE.jrxml
 
|-
 
| Data source
 
|| MRE
 
Query executor (used by the sub-report)
 
|-
 
| Derived fields|| None
 
|-
 
| Sub-reports|| Sub-reports\Summary_Mre_sub-report1.jrxml
 
|}
 
 
 
===Organisation List Report===
 
File: Summary_Organisation.jrxml
 
Data source: Organisation
 
 
 
[[Image:Organisation List Report.png|center|500px|''Figure 53.'' ''Sample report- Organisation list'']]
 
  
===Place List Report===
+
{{Note | All field, variable, and parameter references in {{IMSMANG}} are case-sensitive}}
File: Summary_Place.jrxml
 
Data source: Place
 
[[Image:Place List Report.png|center|500px|''Figure 54.'' ''Sample report- Place list'']]
 
  
===Quality Control Summary Report===
+
{{NavBox HowTo Standardizing Data Analysis and Information Reporting}}
File: Summary_QA.jrxml
+
[[Category:NAA]]
Data source: Qa
 
[[Image:Quality Control Summary Report.png|center|500px|''Figure 55.'' ''Sample report- Quality control summary'']]
 

Latest revision as of 20:24, 20 February 2020

Introduction to iReport

iReport Designer (also known as iReport) is a third-party application that allows you to generate custom-defined reports on IMSMA data. Using iReport, you may define the attributes that are returned by a report and also customise the appearance of the report. Report templates designed in iReport can be imported into IMSMANG and run by IMSMANG users to extract data based on search criteria. Reports can be exported to PDF, RTF, XLS, and other formats. iReport Designer version 5.0.1 is included with the IMSMANG distribution. Using iReport Designer, users create .jrxml iReport templates, a kind of xml report definition, that can be used by IMSMANG to produce a formatted report.

Note.jpg iReport does not support Java 8.

iReport Basics

iReport uses standard reporting terms to refer to the basic building blocks of report templates.

Data Sources

Data sources in iReport refer to the connection between the report template and the IMSMANG database. Each iReport template will have one data source. Data sources in iReport generally refer to items in IMSMANG such as Land, Activity, Education, Accident, Victim, etc. Available data sources include:

Available Data Sources
Accident Device MRE
Accident MRE Detail
Assistance Classification Needs Assessment Classification
Cause Classification Ordnance
Field Report Organisation
Gazetteer Place
Geopoint QM
Geospatialinfo Question
Hazard Received MRE
Hazard Device Task
Hazard Reduction Victim
Hazard Reduction Device Victim Assistance
Impact Survey Victim Assistance Assistance
Interviewee Victim Cause
Link Victim Needs Assessment
Location Work Item

The iReport datasource management and selection window can be found just below the menu bar in iReport Designer.

Datasource selection window

iReport Datasource Selection Window

Fields

Fields in iReport refer to individual IMSMA data elements that are available from a data source. Fields are denoted in iReport using the following syntax $F{fieldname} (e.g. $F{guid}). Each data source contains a list of available fields.

Variables

Variables in iReport are created within the iReport template to manipulate or calculate data. Using variables, users can create calculations such as sums, counts, averages, or other totals. Variables are denoted in iReport using the following syntax $V{variablename} (e.g. $V{SumAreaSize}). Variables can use field and/or parameter data.

Parameters

Parameters in iReport are used to accept and transfer external information, such as information from another report. Parameters are denoted in iReport using the following syntax $P{parametername} (e.g. $P{ParentGuid})

Bands

Bands are used in iReport to specify areas on the resulting report. Each band acts differently in a report. The most used bands in iReport are:

Band Name Use
Title Displayed once at the beginning of the report
Column or Group Header Displayed at the top of each page or section
Detail Displayed once for each data row returned by the report. Most often data elements will exist in this band.
Summary Displayed once at the end of the report. Useful for charts, crosstabs, and totals.

Groups

Groups in iReport are used to display records with one or more common values together on a report. For example, Land with the same value for "Province" could be grouped together in a report. Groups can be added in the iReport Wizard or after a report has been created.

Subreports

Subreports are used in iReport to include more than one data source in a report. For example, to include information about Activities performed on a particular Land, you would include an Activity subreport in the Land report.

Crosstabs, Charts, and Formatting Elements

In addition to the iReport elements addressed above, additional specialized iReport elements are available to include in iReport templates including Crosstabs, Charts, and additional formatting elements such as lines, rectangles, etc. Crosstabs and chart elements typically belong only in the Summary band of a report while formatting elements including images can be included anywhere within the report template.

Note.jpg All field, variable, and parameter references in IMSMANG are case-sensitive