Parameters and Constructors

Period Range Reports allow you to group information into categories or "ranges" from attributes and accounts in the model. These ranges are defined and constructed in the PIN file. Once a range has been constructed it can be referred to and used again by indicating the "range name". In the following example 9 ranges have been constructed for various age classes in a defined set named "ageClass". The labels which appear between the parenthesis will appear as the column headings in the HTML table and in the legend 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.

Example 7. Creating a new Range in PIN file


  RangeLabel[] ageClass = new RangeLabel[] {
       new RangeLabel("Regen", -5, 0),
       new RangeLabel("0 - 20", 0, 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+", 140, 9999)
    };


	  


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

Figure 135. Period Range Report Constructor

public RangePeriodReport (String filename,                 1
                        String title,                      2
                        String units,                      3
                        AttributeStore sourceDataTable,    4
                        String valueExpression,                5 
                        String categoryExpression,                6
                        Comparable [] categories,              7
                        String reselectExpression,         8
                        Int periods,                       9  
                        String additionalHTML,             10
                        boolean computePercent) {          11
		


1

filename - The basename to be used for output from this report. This name must be unique with respect to other reports added to the report writer. The name should not contain a filename extension since the report will automatically add ".html", ".png", or ".csv" as appropriate. If this report is to be grouped with other similar reports in a folder, the folder and filename must be specified here (for example: detail_period/area/age_class).

2

title - The title to be displayed in the HTML and PNG sub-reports. The report writer will automatically append the Scenario Name to the to the report 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.

5

valueExpression - The database column containing values to be summed into the cells of the table.

6

categoryExpression - The database column containing values to be used to classify the record into a tabel column.

7

categories - An array of RangeLabel providing the classification scheme and column names to be used for this table. One column will be created for each member of the array. See the above definition of a RangeLabel and its construction.

8

reselectExpression -An SQL-like expression that will limit the set of records to be used in constructing this table.

9

periods -The number of periods in the report (including the initial time zero period: 40 periods would be represented by 41 to include P:0)

10

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.

11

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.