EspressReport 6.6

quadbase.reportdesigner.ReportAPI
Class SubReport

java.lang.Object
  extended by quadbase.reportdesigner.ReportAPI.QbReport
      extended by quadbase.reportdesigner.ReportAPI.SubReport
All Implemented Interfaces:
quadbase.common.util.IAlertable, IExportConstants, IReport, quadbase.reportdesigner.util.IReportPropertiesConstants, IReportTypeConstants, ISubReport

public class SubReport
extends QbReport
implements ISubReport

This class extends QbReport. It represents a sub-report which is identical to a QbReport except a few disabled methods.

A sub-report should only exist within a QbReport. However, an object of this class cannot be inserted to a QbReport directly. The wrapper class-- ReportElements.SubReportObject-- must be used as a place holder for the sub-report. For more details on how to create and insert a sub-report, please reference the Programming API Guide.

A sub-report cannot be exported by itself. When the main report is exported to HTML, DHTML or PDF, the sub-reports are exported within the same document. When the main report is exported as an RPT file, the reports will generate corresponding RPT files which are stored under the 'SubReport' directory.


Field Summary
 
Fields inherited from class quadbase.reportdesigner.ReportAPI.QbReport
BOLD, BOLDITALIC, CLASSFILE, CLASSFILESOURCE, DATABASESOURCE, DATAFILE, DATAFILESOURCE, EJBSOURCE, EXCELSOURCE, ITALIC, LANDSCAPE, MEMORYDATASOURCE, MULTIPLEDATASOURCES, OLAPRESULTSET, PLAIN, PORTRAIT, QUADBASEXMLFILESOURCE, QUERYFILE, report, SALESFORCESOURCE, SOAPDATASOURCE, subReports, XMLFILE, XMLFILEQUERYSOURCE
 
Fields inherited from interface quadbase.reportdesigner.util.IReportTypeConstants
COLUMNAR, CROSSTAB, MAILINGLABELS, MASTERDETAILS, REPORTTYPENAME, SUMMARY, TOTALTYPE
 
Fields inherited from interface quadbase.reportdesigner.util.IExportConstants
AllowAll, AllowAssembly, AllowCopy, AllowDegradedPrinting, AllowFillIn, AllowModifyAnnotations, AllowModifyContents, AllowPrinting, AllowScreenReaders, BARCODE, CENTER, CSV, DHTML, DHTMLHEADER, EXCEL, EXCEL_OOXML, EXPORTTYPE, FLASH, GIF, HORIZONTAL, HTML, JPEG, LEFT, PAK, PAK_DATA, PDF, PNG, RIGHT, RPT, RPT_DATA, RTF, STL, SVG, TXT, VERTICAL, VIEW, XML_DATA_AND_FORMAT, XML_PURE_DATA, XML_TEMPLATE
 
Fields inherited from interface quadbase.reportdesigner.util.IReportPropertiesConstants
PROPS_CROSSTAB_COLUMN_BREAK_VALUE_ALIGNED_HORIZONTALLY, PROPS_CROSSTAB_FORMULA_IN_HEADER, PROPS_CROSSTAB_FREE_FORM, PROPS_CROSSTAB_SUBTOTAL_COLUMN_POSITION_LEFT, PROPS_DATA_SORTED, PROPS_ENTERPRISE_SERVER, PROPS_GENERATE_CROSSTAB_FORMULAS, PROPS_GENERATE_CROSSTAB_GRANDTOTAL_COLUMN, PROPS_GENERATE_CROSSTAB_SUBTOTAL_COLUMN, PROPS_LIMIT_EXCEL_CELL_SPLIT, PROPS_MULTIPAGE_EXPORT, PROPS_OPTIMIZE_MEMORY, PROPS_PROMPT_PARAMETER, PROPS_RELATIVE_DOMAIN_PATH, PROPS_REPORT_STYLE, PROPS_SECURITY_LEVEL, PROPS_SIDE_BY_SIDE_LAYOUT, PROPS_TRANSPOSE, PROPS_TRANSPOSED_COLUMN, PROPS_USE_BACKUP_DATA
 
Constructor Summary
protected SubReport()
          For internal use only.
  SubReport(quadbase.reportdesigner.report.Report r)
          For internal use only.
 
Method Summary
static SubReportObject createSubReport(QbReport parentReport, byte[] barray)
          Creates a SubReport object using a byte array.
static SubReportObject createSubReport(QbReport parentReport, byte[] barray, java.util.Properties props)
          Creates a SubReport object using a byte array.
static SubReportObject createSubReport(QbReport parentReport, int reportType, DataSheet[] dataSheet, ColInfo[] mapping, java.lang.String template)
          Creates a SubReport object from specified DataSheet object array
static SubReportObject createSubReport(QbReport parentReport, int reportType, IDatabaseInfo dbinfo, ColInfo[] mapping, java.lang.String template)
          Creates a SubReport object from specified database information.
static SubReportObject createSubReport(QbReport parentReport, int reportType, int fileType, java.lang.String filename, ColInfo[] mapping, java.lang.String template)
          Creates a SubReport object from specified datafile name.
static SubReportObject createSubReport(QbReport parentReport, int reportType, IResultSet data, ColInfo[] mapping, java.lang.String template)
          Creates a SubReport object from specified IResultSet(DBData) object.
static SubReportObject createSubReport(QbReport parentReport, int reportType, ISpreadSheetModel sheet, ColInfo[] mapping, java.lang.String template)
          Creates a SubReport object from specified ISpreadSheetModel(SimpleSpreadSheet) object.
static SubReportObject createSubReport(QbReport parentReport, int reportType, java.lang.String dataFile, ColInfo[] mapping, java.lang.String template)
          Creates a SubReport object from specified datafile name.
 void export(int format, java.io.OutputStream out)
          Export is not supported for sub-reports.
 void export(int format, java.lang.String fileName)
          Export is not supported for sub-reports.
 byte[] exportReportToByteArray()
          Export is not supported for sub-reports.
 java.lang.String exportReportToString()
          Export is not supported for sub-reports.
 Parameters getAllParameters()
          Since calling getAllParameters on the main report gets all parameters (including sub report parameters), calling the sub report getAllParameters() is not supported and throws an UnsupportedOperationException.
 SubReportObject getSubReportAt(int index)
          internal use only
 int getSubReportCount()
          Gets the number of sub-reports that this sub-report contains.
 boolean isSubReport()
          Is this a sub report.
 void refreshWithParameters(QbReport mainReport, SubReportObject subreportObj)
          If this sub report is parameterized, refreshes this sub-report with data that matches the current parameter values.
 void removeSubReportAt(int index)
          internal use only
 
Methods inherited from class quadbase.reportdesigner.ReportAPI.QbReport
addFormula, addScript, applyChartPathToAllCharts, applyTemplate, applyTemplate, applyTemplate, applyTemplate, autoFitColumns, cleanExportedFiles, cleanup, clearReportParameterValues, clearSubReportCache, createCrossTabDrillDownReport, createDrillDownReport, createDrillDownReport, createDrillDownReport, createDrillDownReport, createQbReport, createReport, createReport, createReport, createReport, createReport, createTopNReport, deleteViewFile, draw, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, export, finalize, getAllAlertIds, getAllAvailPrinters, getAllParameters, getApplet, getBackgroundColor, getBackgroundImage, getBooleanNULLDataValue, getBottomMargin, getChartPath, getCustomDefinedFunctions, getData, getDataSourceType, getDateTimeNULLDataValue, getDescription, getDHTMLHeader, getDHTMLTopMargin, getDrillDownPath, getDrillDownReport, getDrillDownReport, getDrillDownReportAt, getDrillDownReportAt, getDrillDownReportCount, getDynamicImageURLGenerator, getDynamicReportKeyGenerator, getErrorMessage, getExpandToGroupSectionIndex, getExportedFiles, getFileName, getFileRecordBufferSize, getFixedFieldCrossTabReport, getFontMapping, getFormulaParameters, getFrame, getHTMLParamPage, getHTMLParamPage, getHTMLParamPage, getHTMLParamPage, getHTMLParamPageBlock, getHTMLParamPageBody, getHTMLParamPageBody, getHTMLParamPageBody, getHTMLParamPageBody, getHTMLTarget, getHTMLTitle, getImagePath, getInputData, getInputDataBlockSize, getLeftMargin, getLocale, getMaxCharForRecordFile, getMaxFieldSize, getMaxRecordInMemory, getMinPageHeight, getNULLDataValue, getNumericNULLDataValue, getOrientation, getPageBufferSize, getPageFooter, getPageHeader, getPageHeight, getPageWidth, getPagingThreshold, getParameterPage, getParameterPage, getParameterPage, getParamInput, getParent, getPixelPerInchForExport, getQueryParameters, getQueryTimeout, getReportChartObjectAt, getReportChartObjectAt, getReportChartObjectCount, getReportChartObjects, getReportChartObjects, getReportChartObjects, getReportFooter, getReportHeader, getReportImageAt, getReportImageCount, getReportImages, getReportImages, getReportInfo, getReportInfo, getReportObj, getReportType, getRichTextFonts, getRightMargin, getScriptReportNameForExpandAndCollapse, getSecurityLevel, getSecurityQueryParameterMap, getServletContext, getStringNULLDataValue, getSubReportPath, getSubReports, getSubReports, getTable, getTableOfContentsObject, getTempDirectory, getTimeZone, getTopMargin, getTotalPageBufferSize, getTotalPages, getTotalSections, getTriggeredAlertDetails, getTriggeredAlertIds, getUpdateVersion, getVersion, importFontMapping, initDrillDownTree, initDrillDownTree, isAdjustFont, isAnimationOnForExpandAndCollapse, isDefaultToExpandAllForDHTML, isDHTMLTopMarginRepeatOnEveryPage, isDynamicExport, isEmbeddedScriptWithInThePageForDHTML, isEspressManagerUsed, isExpandAndCollapseOptionForDHTML, isExportToMultiPages, isForDeploy, isForExportOnly, isHeadTagIncluded, isHttpsDynamicExport, isKeepDataSourceOrder, isMultiPageExp, isPromptForParamValues, isUsing16ColorsForRTF, isUsingIE55DHTMLRendering, loadFile, pack, pack, pack, pack, parseProperties, preloadChartObjects, print, print, print, print, print, print, print, print, printUsingAwtPrint, promptFormulaParameters, refresh, refreshWithOriginalData, refreshWithOriginalData, refreshWithSubReportsOriginalData, resetColumnWrap, saveAs, setAdjustFont, setAllDataRegistryLocation, setAnimationOnForExpandAndCollapse, setApplet, setApplyExcelFormat, setAutoClearSubReportCache, setBackgroundColor, setBackgroundImage, setBooleanNULLDataValue, setBottomMargin, setCenterDHTMLReport, setChartExportHTMLParameters, setChartPath, setColumnWrap, setConnectURLForServer, setCustomDefinedFunctions, setDataRegistryLocation, setDateTimeNULLDataValue, setDebugMode, setDebugMode, setDHTMLBrowserMargin, setDHTMLTopMargin, setDHTMLTopMarginRepeatOnEveryPage, setDisplayRow, setDrawBeforeExport, setDrillDownConnection, setDrillDownDatabaseInfo, setDrillDownPath, setDrillDownPath, setDrillDownReportHashtable, setDynamicExport, setDynamicExport, setDynamicExport, setDynamicImageURLGenerator, setDynamicReportKeyGenerator, setEmbeddedScriptWithInThePageForDHTML, setEspressManagerUsed, setExcelExportFitCell, setExpandAndCollapseOptionForDHTML, setExpandAndCollapseOptionForDHTML, setExportDelimiter, setExportEncoding, setExportNewlineDelimiter, setExportNewlineDelimiter, setExportToMultiPages, setExportToSingleWPagination, setExternalStyleSheetName, setFileName, setFileRecordBufferSize, setFitGroupOnPage, setFontMapping, setFontMapping, setFontMapping, setForDeploy, setForExportOnly, setFormulaScriptParamValue, setFrame, setHeadTagIncluded, setHTMLCharset, setHTMLLinksProvider, setHTMLTarget, setHTMLTitle, setHttpsDynamicExport, setHttpsDynamicExport, setImagePath, setInputDataBlockSize, setInternalStyleSheetName, setKeepDataSourceOrder, setLeftMargin, setLimitSubReportQueryExecution, setLocale, setMaxCharForRecordFile, setMaxFieldSize, setMaxRecordInMemory, setMultiPageExp, setNULLDataValue, setNumericNULLDataValue, setOrientation, setPageBufferSize, setPageFooter, setPageHeader, setPageHeight, setPageWidth, setPagingThreshold, setPaperSize, setParameterValues, setParameterValues, setParameterValues, setParameterValues, setParameterValues, setParent, setPdfEncryptionStrength, setPixelPerInchForExport, setPromptForParamValues, setQueryTimeout, setReportFooter, setReportHeader, setReportObjectForSubReports, setRichTextFonts, setRightMargin, setRTFEncoding, setScriptReportNameForExpandAndCollapse, setSecurityLevel, setSecurityLevel, setSecurityQueryParameterMap, setServerAddress, setServerHosts, setServerPortNumber, setServletContext, setServletDirectory, setServletRunner, setSFDrillDownDatabaseInfo, setSnapToGrid, setStringCustomizer, setStringNULLDataValue, setSubReportCache, setSubReportFormulaParameter, setSubReportParameters, setSubReportPath, setSubReports, setSubReportsQueryParameter, setTempDirectory, setTimeZone, setTopMargin, setTotalPageBufferSize, setUseSingleTableForDistinctParamValue, setUseStyleSheet, setUsing16ColorsForRTF, setUsingIE55DHTMLRendering, setXMLEncoding, sortByColumn, sortByMultiColumn, unpack, unpack, updateDataSource, useHttp, useServlet, useSingleTableForDistinctParamValue, useSubReportCache
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface quadbase.reportdesigner.util.ISubReport
getReportInfo
 

Constructor Detail

SubReport

protected SubReport()
For internal use only. Creates an empty SubReport object


SubReport

public SubReport(quadbase.reportdesigner.report.Report r)
For internal use only. Creates a SubReport object with the given report

Method Detail

createSubReport

public static SubReportObject createSubReport(QbReport parentReport,
                                              int reportType,
                                              IDatabaseInfo dbinfo,
                                              ColInfo[] mapping,
                                              java.lang.String template)
                                       throws java.lang.Exception
Creates a SubReport object from specified database information.

Parameters:
parentReport - the parent QbReport object for this SubReport object
reportType - the Report Type for this SubReport object
dbinfo - the database connection, user ID & password, and query to use as datasource for this SubReport
mapping - Database result to report table mapping.
template - Template RPT file to be applied to the sub-report.
Returns:
a SubReportObject object that serves as the place holder and ready to add this SubReport to the parent report.
Throws:
java.lang.Exception

createSubReport

public static SubReportObject createSubReport(QbReport parentReport,
                                              int reportType,
                                              java.lang.String dataFile,
                                              ColInfo[] mapping,
                                              java.lang.String template)
                                       throws java.lang.Exception
Creates a SubReport object from specified datafile name.

Parameters:
parentReport - the parent QbReport object for this SubReport object
reportType - the Report Type for this SubReport object
dataFile - the datafile to be used as the datasource
mapping - Database result to report table mapping
template - Template RPT file to be applied to the sub-report
Returns:
a SubReportObject object that serves as the place holder and ready to add this SubReport to the parent report.
Throws:
java.lang.Exception

createSubReport

public static SubReportObject createSubReport(QbReport parentReport,
                                              int reportType,
                                              int fileType,
                                              java.lang.String filename,
                                              ColInfo[] mapping,
                                              java.lang.String template)
                                       throws java.lang.Exception
Creates a SubReport object from specified datafile name.

Parameters:
parentReport - the parent QbReport object for this SubReport object
reportType - the Report Type for this SubReport object
fileType - the datafile type: SubReport.CLASSFILE, SubReport.DATAFILE, SubReport.QUERYFILE, SubReport.XMLFILE
filename - the datafile to be used as the datasource
mapping - Database result to report table mapping
template - Template RPT file to be applied to the sub-report
Returns:
a SubReportObject object that serves as the place holder and ready to add this SubReport to the parent report.
Throws:
java.lang.Exception

createSubReport

public static SubReportObject createSubReport(QbReport parentReport,
                                              int reportType,
                                              IResultSet data,
                                              ColInfo[] mapping,
                                              java.lang.String template)
                                       throws java.lang.Exception
Creates a SubReport object from specified IResultSet(DBData) object.

Parameters:
parentReport - the parent QbReport object for this SubReport object
reportType - the Report Type for this SubReport object
data - the implemented IResultSet, DBData, object to be used as the datasource
mapping - Database result to report table mapping
template - Template RPT file to be applied to the sub-report
Returns:
a SubReportObject object that serves as the place holder and ready to add this SubReport to the parent report.
Throws:
java.lang.Exception

createSubReport

public static SubReportObject createSubReport(QbReport parentReport,
                                              int reportType,
                                              ISpreadSheetModel sheet,
                                              ColInfo[] mapping,
                                              java.lang.String template)
                                       throws java.lang.Exception
Creates a SubReport object from specified ISpreadSheetModel(SimpleSpreadSheet) object.

Parameters:
parentReport - the parent QbReport object for this SubReport object
reportType - the Report Type for this SubReport object
sheet - the implemented ISpreadSheetModel, SimpleSpreadSheet, object to be used as the datasource
mapping - Database result to report table mapping
template - Template RPT file to be applied to the sub-report
Returns:
a SubReportObject object that serves as the place holder and ready to add this SubReport to the parent report.
Throws:
java.lang.Exception

createSubReport

public static SubReportObject createSubReport(QbReport parentReport,
                                              int reportType,
                                              DataSheet[] dataSheet,
                                              ColInfo[] mapping,
                                              java.lang.String template)
                                       throws java.lang.Exception
Creates a SubReport object from specified DataSheet object array

Parameters:
parentReport - the parent QbReport object for this SubReport object
reportType - the Report Type for this SubReport object
dataSheet - the DataSheet object array to be used as datasource
mapping - Database result to report table mapping
template - Template RPT file to be applied to the sub-report
Returns:
a SubReportObject object that serves as the place holder and ready to add this SubReport to the parent report.
Throws:
java.lang.Exception

createSubReport

public static SubReportObject createSubReport(QbReport parentReport,
                                              byte[] barray)
                                       throws java.lang.Exception
Creates a SubReport object using a byte array. The byte array should only come from the SubReportObject.getBytes() method. Return the SubReportObject object that serves as the place holder and ready to be added to the parent report.

Throws:
java.lang.Exception

createSubReport

public static SubReportObject createSubReport(QbReport parentReport,
                                              byte[] barray,
                                              java.util.Properties props)
                                       throws java.lang.Exception
Creates a SubReport object using a byte array. The byte array should only come from the SubReportObject.getBytes() method. Return the SubReportObject object that serves as the place holder and ready to be added to the parent report.

Throws:
java.lang.Exception
See Also:
QbReport.QbReport(Object, byte[], java.util.Properties)

export

public void export(int format,
                   java.lang.String fileName)
            throws java.lang.Exception
Export is not supported for sub-reports. This method will throw an IllegalArgumentException.

Overrides:
export in class QbReport
Parameters:
format - See the class IExportConstants for possible values.
fileName - name of file to export to
Throws:
java.lang.Exception

export

public void export(int format,
                   java.io.OutputStream out)
            throws java.lang.Exception
Export is not supported for sub-reports. This method will throw an IllegalArgumentException.

Overrides:
export in class QbReport
Parameters:
format - format of the exported report. See the class IExportConstants for possible values.
out - OutputStream to export the QbReport.
Throws:
java.lang.Exception

exportReportToByteArray

public byte[] exportReportToByteArray()
                               throws java.lang.Exception
Export is not supported for sub-reports. This method will throw an IllegalArgumentException.

Overrides:
exportReportToByteArray in class QbReport
Returns:
byte array
Throws:
java.lang.Exception

exportReportToString

public java.lang.String exportReportToString()
                                      throws java.lang.Exception
Export is not supported for sub-reports. This method will throw an IllegalArgumentException.

Overrides:
exportReportToString in class QbReport
Returns:
The report data in String format
Throws:
java.lang.Exception
See Also:
Parameter: ReportData

isSubReport

public boolean isSubReport()
Is this a sub report.

Overrides:
isSubReport in class QbReport
Returns:
always true

getSubReportCount

public int getSubReportCount()
Gets the number of sub-reports that this sub-report contains. This method is not supported and throws IllegalArgumentException.

Overrides:
getSubReportCount in class QbReport

getSubReportAt

public SubReportObject getSubReportAt(int index)
internal use only

Overrides:
getSubReportAt in class QbReport

removeSubReportAt

public void removeSubReportAt(int index)
internal use only

Overrides:
removeSubReportAt in class QbReport

refreshWithParameters

public void refreshWithParameters(QbReport mainReport,
                                  SubReportObject subreportObj)
                           throws java.lang.Exception
If this sub report is parameterized, refreshes this sub-report with data that matches the current parameter values.

Throws:
java.lang.Exception

getAllParameters

public Parameters getAllParameters()
Since calling getAllParameters on the main report gets all parameters (including sub report parameters), calling the sub report getAllParameters() is not supported and throws an UnsupportedOperationException.

Overrides:
getAllParameters in class QbReport
Returns:
a Parameters Object that represents all parameters in this report

EspressReport 6.6