Class SubReport
java.lang.Object
quadbase.reportdesigner.ReportAPI.QbReport
quadbase.reportdesigner.ReportAPI.SubReport
- All Implemented Interfaces:
quadbase.common.util.IAlertable,IExportConstants,IReport,quadbase.reportdesigner.util.IReportPropertiesConstants,IReportTypeConstants,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, XMLFILEQUERYSOURCEFields 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_TEMPLATEFields 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_DATAFields inherited from interface quadbase.reportdesigner.util.IReportTypeConstants
COLUMNAR, CROSSTAB, MAILINGLABELS, MASTERDETAILS, REPORTTYPENAME, SUMMARY, TOTALTYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SubReportObjectcreateSubReport(QbReport parentReport, byte[] barray) Creates a SubReport object using a byte array.static SubReportObjectcreateSubReport(QbReport parentReport, byte[] barray, Properties props) Creates a SubReport object using a byte array.static SubReportObjectcreateSubReport(QbReport parentReport, int reportType, int fileType, String filename, ColInfo[] mapping, String template) Creates a SubReport object from specified datafile name.static SubReportObjectcreateSubReport(QbReport parentReport, int reportType, String dataFile, ColInfo[] mapping, String template) Creates a SubReport object from specified datafile name.static SubReportObjectcreateSubReport(QbReport parentReport, int reportType, DataSheet[] dataSheet, ColInfo[] mapping, String template) Creates a SubReport object from specified DataSheet object arraystatic SubReportObjectcreateSubReport(QbReport parentReport, int reportType, IDatabaseInfo dbinfo, ColInfo[] mapping, String template) Creates a SubReport object from specified database information.static SubReportObjectcreateSubReport(QbReport parentReport, int reportType, IResultSet data, ColInfo[] mapping, String template) Creates a SubReport object from specified IResultSet(DBData) object.static SubReportObjectcreateSubReport(QbReport parentReport, int reportType, ISpreadSheetModel sheet, ColInfo[] mapping, String template) Creates a SubReport object from specified ISpreadSheetModel(SimpleSpreadSheet) object.voidexport(int format, OutputStream out) Export is not supported for sub-reports.voidExport is not supported for sub-reports.byte[]Export is not supported for sub-reports.Export is not supported for sub-reports.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.getSubReportAt(int index) internal use onlyintGets the number of sub-reports that this sub-report contains.booleanIs this a sub report.voidrefreshWithParameters(QbReport mainReport, SubReportObject subreportObj) If this sub report is parameterized, refreshes this sub-report with data that matches the current parameter values.voidremoveSubReportAt(int index) internal use onlyMethods 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, setExcelExportNonNumericFitCell, setExcelExportStreaming, setExcelExportWindowsize, 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, useSubReportCacheMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface quadbase.reportdesigner.util.ISubReport
getReportInfo
-
Constructor Details
-
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 Details
-
createSubReport
public static SubReportObject createSubReport(QbReport parentReport, int reportType, IDatabaseInfo dbinfo, ColInfo[] mapping, String template) throws Exception Creates a SubReport object from specified database information.- Parameters:
parentReport- the parent QbReport object for this SubReport objectreportType- the Report Type for this SubReport objectdbinfo- the database connection, user ID invalid input: '&' password, and query to use as datasource for this SubReportmapping- 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:
Exception
-
createSubReport
public static SubReportObject createSubReport(QbReport parentReport, int reportType, String dataFile, ColInfo[] mapping, String template) throws Exception Creates a SubReport object from specified datafile name.- Parameters:
parentReport- the parent QbReport object for this SubReport objectreportType- the Report Type for this SubReport objectdataFile- the datafile to be used as the datasourcemapping- Database result to report table mappingtemplate- 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:
Exception
-
createSubReport
public static SubReportObject createSubReport(QbReport parentReport, int reportType, int fileType, String filename, ColInfo[] mapping, String template) throws Exception Creates a SubReport object from specified datafile name.- Parameters:
parentReport- the parent QbReport object for this SubReport objectreportType- the Report Type for this SubReport objectfileType- the datafile type: SubReport.CLASSFILE, SubReport.DATAFILE, SubReport.QUERYFILE, SubReport.XMLFILEfilename- the datafile to be used as the datasourcemapping- Database result to report table mappingtemplate- 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:
Exception
-
createSubReport
public static SubReportObject createSubReport(QbReport parentReport, int reportType, IResultSet data, ColInfo[] mapping, String template) throws Exception Creates a SubReport object from specified IResultSet(DBData) object.- Parameters:
parentReport- the parent QbReport object for this SubReport objectreportType- the Report Type for this SubReport objectdata- the implemented IResultSet, DBData, object to be used as the datasourcemapping- Database result to report table mappingtemplate- 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:
Exception
-
createSubReport
public static SubReportObject createSubReport(QbReport parentReport, int reportType, ISpreadSheetModel sheet, ColInfo[] mapping, String template) throws Exception Creates a SubReport object from specified ISpreadSheetModel(SimpleSpreadSheet) object.- Parameters:
parentReport- the parent QbReport object for this SubReport objectreportType- the Report Type for this SubReport objectsheet- the implemented ISpreadSheetModel, SimpleSpreadSheet, object to be used as the datasourcemapping- Database result to report table mappingtemplate- 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:
Exception
-
createSubReport
public static SubReportObject createSubReport(QbReport parentReport, int reportType, DataSheet[] dataSheet, ColInfo[] mapping, String template) throws Exception Creates a SubReport object from specified DataSheet object array- Parameters:
parentReport- the parent QbReport object for this SubReport objectreportType- the Report Type for this SubReport objectdataSheet- the DataSheet object array to be used as datasourcemapping- Database result to report table mappingtemplate- 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:
Exception
-
createSubReport
public static SubReportObject createSubReport(QbReport parentReport, byte[] barray) throws 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:
Exception
-
createSubReport
public static SubReportObject createSubReport(QbReport parentReport, byte[] barray, Properties props) throws 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:
Exception- See Also:
-
export
Export is not supported for sub-reports. This method will throw an IllegalArgumentException. -
export
Export is not supported for sub-reports. This method will throw an IllegalArgumentException. -
exportReportToByteArray
Export is not supported for sub-reports. This method will throw an IllegalArgumentException.- Overrides:
exportReportToByteArrayin classQbReport- Returns:
- byte array
- Throws:
Exception
-
exportReportToString
Export is not supported for sub-reports. This method will throw an IllegalArgumentException.- Overrides:
exportReportToStringin classQbReport- Returns:
- The report data in String format
- Throws:
Exception- See Also:
-
isSubReport
public boolean isSubReport()Is this a sub report.- Overrides:
isSubReportin classQbReport- 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:
getSubReportCountin classQbReport
-
getSubReportAt
internal use only- Overrides:
getSubReportAtin classQbReport
-
removeSubReportAt
public void removeSubReportAt(int index) internal use only- Overrides:
removeSubReportAtin classQbReport
-
refreshWithParameters
public void refreshWithParameters(QbReport mainReport, SubReportObject subreportObj) throws Exception If this sub report is parameterized, refreshes this sub-report with data that matches the current parameter values.- Throws:
Exception
-
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:
getAllParametersin classQbReport- Returns:
- a Parameters Object that represents all parameters in this report
-