Class PivotTableReport

java.lang.Object
ca.spatial.reportwriter.Report
ca.spatial.reportwriter.PivotTableReport
All Implemented Interfaces:
Selectable<Report>, Comparable<Report>

public class PivotTableReport extends Report
This class implements a flexible report template. The layout of the report can designed using a Pivot Table user interface. Classifiers can be added to rows and columns, data can be filtered using a variety of simple or complex methods.
See Also:
ReportWriter
  • Field Details

    • TYPES

      public static final String[] TYPES
  • Constructor Details

    • PivotTableReport

      public PivotTableReport(String filename, String title, AttributeStore sourceDataTable)
      The PivotTableReport constructor. Only a few basic parameters are captured in this construtor. Most other parameters are specified in the methods that add rows and columns to the report.

      Parameters:
      filename - the base name used to save the file
      title - the reprot title
      sourceDataTable - the data table that the report is based on
  • Method Details

    • setHTMLText

      public PivotTableReport setHTMLText(String htmlText)
      Set the additional HTML text for this report. This information will be displayed in the report above the table.
    • getHTMLText

      public String getHTMLText()
      Set the additional HTML text for this report.
    • addCalculatedColumn

      public PivotTableReport addCalculatedColumn(String label, String expression)
    • getCalculatedColumns

      public PivotTableReport.CalcFieldSpec[] getCalculatedColumns()
    • addColumnField

      public PivotFieldParams addColumnField(String field)
      Add a column to the pivot table. The object that is returned from this method used to configure the field options.
      Parameters:
      field - the name of the field to add to the pivot table
    • addRowField

      public PivotFieldParams addRowField(String field)
    • addDataField

      public PivotFieldParams addDataField(String field)
    • addFilterField

      public PivotFieldParams addFilterField(String field)
    • hiddenValue

      public PivotTableReport hiddenValue(Object[] values)
    • hiddenColumn

      public PivotTableReport hiddenColumn(String name, Object[] values)
    • hiddenRow

      public PivotTableReport hiddenRow(String name, Object[] values)
    • getShowGrandTotalForRow

      public boolean getShowGrandTotalForRow()
    • setShowGrandTotalForRow

      public PivotTableReport setShowGrandTotalForRow(boolean state)
    • getShowGrandTotalForColumn

      public boolean getShowGrandTotalForColumn()
    • setShowGrandTotalForColumn

      public PivotTableReport setShowGrandTotalForColumn(boolean state)
    • initializeFromModel

      public void initializeFromModel(com.jidesoft.pivot.CalculatedPivotDataModel pivotDataModel)
    • doReport

      public ca.spatial.reportwriter.Report.DataCache doReport(String filename, PrintStream out, Map<String,​Object> param, ca.spatial.reportwriter.Report.DataCache cache)
      Description copied from class: Report
      The method used by the report writer to format the requested report. This method is implemented in every custom report. Application programs generally do not need to call this method, but instead use the report writer methods to obtain reports.
      Specified by:
      doReport in class Report
      Parameters:
      filename - The full name of the report to be printed, including the extension of the sub-report (if any).
      out - The output stream to print output on to.
      param - A HashMap containing parameters that modify the report (for example the scenario name).
    • getTypes

      public String[] getTypes()
      Description copied from class: Report
      An accessor function to retrieve the list of report types supported by this report. See the documentation for the TYPES variable for the list of sub-types.
      Specified by:
      getTypes in class Report