Parameters and Constructors

A Range Report allows the user to group information into categories or "ranges" defined and constructed in the PIN file, based on the required information. Once this range has been constructed it can be referred to over and over again by using the "range name". The labels which appear between the parentheses will appear as the row headings in the HTML table and along the X-axis of the PNG bar chart. The numbers which follow (separated by commas) are the lower and upper limits of the ranges, used to categorize each value. If the range values overlap, the cell value will be placed in the first range that satisfies the conditions. In this example, the range was given a name of "ageClass", which will be referred to in the construction of the Range Report in later examples. This particular range was also used to construct the output examples in this section.

Example 8. Creating a new Range in PIN file


	  RangeLabel[] ageClass = new RangeLabel[] {
	  new RangeLabel("Regen", -5, 0),
	  new RangeLabel("0 - 20", 1, 20),
	  new RangeLabel("20 - 40", 20, 40),
	  new RangeLabel("40 - 60", 40, 60),
	  new RangeLabel("60 - 80", 60, 80),
	  new RangeLabel("80 - 100", 80, 100),
	  new RangeLabel("100 - 120", 100, 120),
	  new RangeLabel("120 - 140", 120, 140),
	  new RangeLabel("140+", 141, 9999)
	  };


	


A Range Report is defined in the PIN file by specifying 10 simple parameters and conditions. The following figure shows the construction of this type of report.

Figure 144. Range Report Constructor

	  public RangeReport(String filename,                1
	  String title,                   2
	  String units,                   3
	  AttributeStore sourceDataTable, 4
	  String pattern,            5
	  String rangeColumn,             6
	  RangeLabel[] ranges,            7
	  int[] periods,                  8
	  String additionalHTML,          9
	  boolean percent)                10

	


1

filename - The basename to be used for output from this report. This name must be unique with respect to other reports in the Report Writer. This filename should NOT contain any file extension as a Range Report will automatically create 3 files (.html, .png, .csv). If the report is to be grouped with other reports in a folder, the folder name should also be included (period/area/period2).

2

title - The title to be displayed in the HTML and PNG sub-repots, as well as in the Report Writer directory tree. The Report Writer will automatically append the Scenario name to the title.

3

units - The units of measure to be displayed on the Y-axis of the PNG sub-report.

4

sourceDataTable - The table containing the data to be summarized. Refer to table by "control.getTableName(),", for example "control.getBlockTable(),".

5

pattern - Specify the attribute prefix to be located in the source table. The unique attributes that share a common prefix will compose the columns in the Range Report, and provide the data to be summarized. For example: "feature.Area.managed." will look for all attributes that begin with this prefix.

6

rangeColumn - This parameter refers to a column in the sourceDataTable that will be used to "classify" the attributes into the predefined ranges. This is the column that will be evaluated against the range thresholds, allowing the Range Report to sort attribute information into the defined ranges.

7

ranges - this is where the "range name" is specified to refer to a predefined range in the PIN file. In the above example of a range definition, it was given the name "ageClass". This is where the name would be referred to to utilize that particular range and labels.

8

periods - the periods to be included in the report. A single period can be referred to or a series of periods can be listed {1,2,3,4,5} or an array can be defined.

9

additionalHTML - Artibrary HTML format text that can be added in to the HTML sub-report. This text can contain explanatory text, display a coporate logo, or provide a hyper-link to a related table. This text will appear beneath the PNG sub-report in the HTML document.

10

computePercent - A boolean value that indicates if the cell data should be converted to percent of the row total. Percent format data can assist in showing changed in relative composition over time.