OpenAPI 1.0

com.aquafold.openapi.report
Interface AQReport


public interface AQReport

This interface provides a way to link multiple data sets together and presents them as a single report.

Data sets listed below are currently supported:

And, as of this release, a report can be presented in one of the following ways: See AQDataSetSettings for an example about how a data set is typically formatted.

Multiple reports can also be linked together, please see AQReportSettings for more information.


Method Summary
 void addDataSet(AQDataSet dataSet, AQReportDataSetSettings settings)
          Adds a data set to this report.
 void addDataSet(AQDataSet dataSet, AQReportDataSetSettings settings, AQChart chart)
          Adds a data set, with chart enabled, to this report.
 void addDataSet(AQPivotDataSet dataSet, AQReportDataSetSettings settings)
          Adds a pivot data set to this report.
 void addDataSet(AQPivotDataSet dataSet, AQReportDataSetSettings settings, AQChart chart)
          Adds a pivot data set, with chart enabled, to this report.
 byte[] getAsExcel2003()
          Returns this report as a byte array representing an Excel 2003 file.
 byte[] getAsExcel2007()
          Returns this report as a byte array representing an Excel 2007 file.
 AQReportSettings getSettings()
          Returns the settings that define how this report to be rendered.
 String renderHtml()
          Renders this report in HTML.
 String renderText()
          Renders this report in plain text.
 void saveAsExcel2003(String fileName)
          Saves this report as an Excel 2003 file.
 void saveAsExcel2007(String fileName)
          Saves this report as an Excel 2007 file.
 void saveTo(AQExcelSpreadsheet spreadsheet)
          Inserts report in an Excel spreadsheet.
 void setSettings(AQReportSettings settings)
          Sets settings for this report.
 

Method Detail

setSettings

void setSettings(AQReportSettings settings)
Sets settings for this report.

Parameters:
settings - the report settings, default settings is used if null

getSettings

AQReportSettings getSettings()
Returns the settings that define how this report to be rendered. Default settings is returned if custom settings is not defined, setSettings(AQReportSettings settings) can be used to set custom settings.

Returns:
the settings that define how this report to be rendered.

addDataSet

void addDataSet(AQDataSet dataSet,
                AQReportDataSetSettings settings)
Adds a data set to this report.

Parameters:
dataSet - the data set
settings - the data set settings, default settings is used if null

addDataSet

void addDataSet(AQDataSet dataSet,
                AQReportDataSetSettings settings,
                AQChart chart)
Adds a data set, with chart enabled, to this report. The chart parameter cannot be null and is expected to be created from the specified dataSet with data source and chart properties properly defined.

Parameters:
dataSet - the data set
settings - the data set settings, default settings is used if null
chart - the chart created from the specified dataSet

addDataSet

void addDataSet(AQPivotDataSet dataSet,
                AQReportDataSetSettings settings)
Adds a pivot data set to this report.

Parameters:
dataSet - the pivot data set
settings - the data set settings, default settings is used if null

addDataSet

void addDataSet(AQPivotDataSet dataSet,
                AQReportDataSetSettings settings,
                AQChart chart)
Adds a pivot data set, with chart enabled, to this report. The chart parameter cannot be null and is expected to be created from the specified dataSet with data source and chart properties properly defined.

Parameters:
dataSet - the pivot data set
settings - the data set settings, default settings is used if null
chart - the chart created from the specified dataSet

renderText

String renderText()
                  throws Exception
Renders this report in plain text.

Returns:
the string containing the formatted report
Throws:
Exception - if none of contained data sets can be rendered

renderHtml

String renderHtml()
                  throws Exception
Renders this report in HTML.

Returns:
the string containing the generated HTML document
Throws:
Exception - if none of contained data sets can be rendered

saveAsExcel2003

void saveAsExcel2003(String fileName)
                     throws Exception
Saves this report as an Excel 2003 file. If the specified file already exists, it will be overridden.

Parameters:
fileName - the name of the file where report to be saved
Throws:
Exception - if none of contained data sets can be converted to Excel

saveAsExcel2007

void saveAsExcel2007(String fileName)
                     throws Exception
Saves this report as an Excel 2007 file. If the specified file already exists, it will be overridden.

Parameters:
fileName - the name of the file where report to be saved
Throws:
Exception - if none of contained data sets can be converted to Excel

getAsExcel2003

byte[] getAsExcel2003()
                      throws Exception
Returns this report as a byte array representing an Excel 2003 file.

Returns:
a byte array representing an Excel 2003 file
Throws:
Exception - if none of contained data sets can be converted to Excel

getAsExcel2007

byte[] getAsExcel2007()
                      throws Exception
Returns this report as a byte array representing an Excel 2007 file.

Returns:
a byte array representing an Excel 2007 file
Throws:
Exception - if none of contained data sets can be converted to Excel

saveTo

void saveTo(AQExcelSpreadsheet spreadsheet)
            throws Exception
Inserts report in an Excel spreadsheet.

Parameters:
spreadsheet -
Throws:
Exception

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.