Report Output and Formatting

A Category Report will automatically generate three formats: HTML, PNG and CSV. These sub-reports are all created using identical data, however they are formatted differently depending on the output style. Since a Category Report automatically creates these three files NO file extension should be specified when defining the filename parameter. The Report Writer will automatically create a ".html", ".png" and ".csv" file. The default report provided is the HTML report, however this report provides links to the other two formats, and all three formats are contained in the scenario folder when saved. For the general layout of the Category Report see: General Report Format.

The CSV sub-report contains comma separated text values which can be read into a text editor or spreadsheet application. This sub-report contains the simplest formatting, with the first row containing the column headings and subsequent rows start with a unique category heading followed by cell values summed from specified periods. The final value in each row is the total for the entire row (or total for the row category). The follow shows a sample of a CSV format file for a Category Report:

LMU,product.Area.managed.DF,product.Area.managed.LA,product.Area.managed.PL,product.Area.managed.SEFA,
product.Area.managed.SW,product.Area.managed.SWWet,TOTAL
A,0,0,0,0,0,0,0
B,74,0,253,2,251,0,579
C,0,0,0,0,0,0,0
CH,0,0,0,0,0,0,0
CP,0,0,0,0,0,0,0
CWC,0,0,0,0,3,0,3
E,0,0,0,0,0,0,0
F,0,0,1,0,0,0,1
HE,0,0,121,4,10,0,136
HO,0,0,0,0,1,0,1
IR,18,0,225,1,99,6,348
LI,0,0,170,26,34,0,230
...

	

The HTML sub-report contains a formatted table holding identical information to the CSV report. Column headings are based on the unique values found using the columnPrefix, and are displayed in a nested format according to the following recipe:

Rows headings are created from the unique string values contained in the categories array. The cells themselves are populated with summarized data from the categoryColumn, and totalled for each row.

Figure 139. Category Report HTML Table

The figure shows an example of the table portion of the HTML report. The colour-coded areas show row category headings (orange), category totals (Blue), column prefix headings (Green), and cell values (Tan).


Besides the table, the HTML report also contains a title, the name of the scenario, an embedded PNG version of the data, optional supplementary HTML data (additionalHTML), a link to the CSV sub-report, and a link to an index report.

The PNG sub-report shows a stacked-bar chart with one bar for each category, and one stack for each unique value of the second category. The Y-axis is automatically scaled to fit the data, and labeled with the units parameter. The X-axis displays the string array for the category.

Figure 140. PNG Sub-Report produced by a Category Report

The stacked bar chart is automatically created and embedded in the HTML document. See the General Report Format for the layout of the entire Category Report.