Parameters and Constructors

Period Category 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, nine ranges have been constructed for various age classes in a defined set named "ageClass". The labels which appear between the parentheses 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 18. 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 Category Report is defined in the PIN file by specifying eleven parameters and conditions. The following figure shows the construction of this type of report.

       public PeriodCategoryReport (String filename,
                                    String title,
                                    String units,
                                    AttributeStore sourceDataTable,
                                    String valueExpression,          1 
                                    String categoryExpression,       2
                                    Comparable [] categories,        3
                                    String reselectExpression,  
                                    Int periods,       
                                    String additionalHTML,
                                    boolean computePercent)

1

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

2

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

3

categories - An array (i.e. RangeLabel) or defined category providing the classification scheme and column names to be used for this table. One column will be created in the report for each member of the array. See the above definition of a RangeLabel and its construction.