The following example is a simple Period Value Report definition in a PIN file.
ReportWriter.addReport(new PeriodValueReport("detail_lmu/area/lmu_A", "Area in LMU 'A' by Species code and period", "hectares", control.getBlockTable(), "feature.Area.managed", "LMU == 'A'", 11, "Spatial Planning Systems: 2002", false));
A Period Value Report would be most effectively used to display attribute information contained in the Block Table, as attributes in the Block Table are organized in columns with prefixes. In this way a Period Value Report would allow the user to summarize information about particular Blocks in the dataset. Reselect expression could be used to limit the number of Blocks that were being summarized, or all blocks could be included. This is the major distinction of the Period Value Report from the standard Report, which summarizes target information.
In this particular example, a Period Value report was added to
the "area" sub-folder with the filename
"detail_lmu/area/lmu_A". NO file extension was specified here
as the Report Writer will automatically create three separate
files: "lmu_A.html", "lmu_A.csv" and "lmu_A.png". The title of
the report, "Area in LMU 'A' by Species code and period" will
appear at the top of the HTML and PNG sub-reports, as well as in
the Index Report for the "area" sub-folder, and the directory
tree. The units
"hectares" will appear on
the Y-axis of the PNG bar chart.
The information for this report was derived from the Block Table
(control.getBlockTable()
) using the column
prefix of "feature.Area.managed" to locate unique attribute
columns (ie. species .DF, .LA, .SEFA...). The only rows that
were selected from the Block Table to be summed for cell values
were those rows that contained "A" in the LMU column of the
table. The reselectExpression
"LMU='A'" was
used to narrow the amount of information being summed to only
those Blocks (rows) that fell into Landscape Management Unit
(LMU) A, all other blocks were ignored.
Only the first 10 planning periods would have been represented in this
report, along with the initial conditions (11). The company
name was added as additionalHTML
under the
embedded PNG chart, and all values in the HTML table appear in
absolute terms as opposed to percentages of the total
(computePercent
= false).