Class SubReportObject

All Implemented Interfaces:
Serializable

public class SubReportObject extends ReportCell implements Serializable
This represents a sub report that can be added to a QbReport -- in the ReportSection, or ReportTable.
See Also:
  • Field Details

  • Constructor Details

    • SubReportObject

      public SubReportObject(String parentFile)
      For internal use only Construct a place holder for a sub-report.
      Parameters:
      parentFile - The file name of the root report. Assumes the root report to be saved and has a file name.
      name - Name of the sub-report
    • SubReportObject

      public SubReportObject(String parentFile, String id)
      internal use only
    • SubReportObject

      public SubReportObject(String parentFile, String id, String domainPath, quadbase.common.util.internal.FileInMemTable subFilesTable)
      internal use only
    • SubReportObject

      public SubReportObject()
      For internal use only.
    • SubReportObject

      public SubReportObject(ISubReport sr)
      For internal use only. Used only with ReportAPI.
  • Method Details

    • copy

      public void copy(SubReportObject _cell)
      internal use only Specifies this SubReportObject to be the same as "_cell"
      Parameters:
      _cell - The SubReportObject object being emulated
    • deepCopy

      public void deepCopy(SubReportObject _cell)
      For internal use only
    • equals

      public boolean equals(SubReportObject _cell)
      Checks if this SubReportObject object's properties are the same as "_cell"
      Parameters:
      _cell - the SubReportObject object being compared to
    • getFileName

      public String getFileName()
      Return the file location of the sub-report RPT file
    • getFileName

      public String getFileName(quadbase.common.util.internal.FileInMemTable subFilesTable)
    • setFileName

      public void setFileName(String fn)
      For internal use only. Specifies the file location for the sub-report.
    • getParamShareReportID

      public String getParamShareReportID()
      Gets the id for this sub report object when sharing parameter values with main report.
    • setParamShareReportID

      public void setParamShareReportID(String id)
      internal use only
    • write

      public void write(DataOutput out) throws IOException
      For internal use only.
      Overrides:
      write in class ReportCell
      Throws:
      IOException
    • write

      public void write(quadbase.common.util.internal.FileInMemTable subFilesTable, DataOutput out) throws IOException
      For internal use only.
      Throws:
      IOException
    • writeByteArray

      public void writeByteArray(DataOutput out, quadbase.common.util.internal.FileInMemTable subFilesTable) throws IOException
      internal use only
      Throws:
      IOException
    • writeXML

      public void writeXML(Writer out, boolean writeElementTag) throws IOException
      internal use only
      Overrides:
      writeXML in class ReportCell
      Throws:
      IOException
    • createSubReportObject

      public static SubReportObject createSubReportObject(Node node, int version) throws Exception
      For internal use only.
      Throws:
      Exception
    • readXML

      public void readXML(Node node, int version) throws Exception
      For internal use only.
      Overrides:
      readXML in class ReportCell
      Throws:
      Exception
    • createSubReportObject

      public static SubReportObject createSubReportObject(DataInput in, int version) throws Exception
      For internal use only.
      Throws:
      Exception
    • createSubReportObject

      public static SubReportObject createSubReportObject(DataInput in, int version, boolean pack, boolean fromReportDesigner, quadbase.common.util.internal.FileInMemTable subFilesTable) throws Exception
      internal use only
      Throws:
      Exception
    • createSubReportObject

      public static SubReportObject createSubReportObject(DataInput in, int version, boolean pack, boolean fromReportDesigner, quadbase.common.util.internal.FileInMemTable subFilesTable, boolean writeToFileSystem) throws Exception
      internal use only
      Throws:
      Exception
    • createSubReportObject

      public static SubReportObject createSubReportObject(DataInput in, int version, boolean pack, boolean fromReportDesigner, quadbase.common.util.internal.FileInMemTable subFilesTable, boolean writeToFileSystem, String domainPath) throws Exception
      internal use only
      Throws:
      Exception
    • createSubReportObject

      public static SubReportObject createSubReportObject(DataInput in, int version, boolean pack, boolean fromReportDesigner, quadbase.common.util.internal.FileInMemTable subFilesTable, boolean writeToFileSystem, String domainPath, boolean loadNewOnly) throws Exception
      Throws:
      Exception
    • readByteArray

      public void readByteArray(DataInput in, int version, boolean fromReportDesigner, quadbase.common.util.internal.FileInMemTable subFilesTable, boolean write) throws Exception
      internal use only
      Throws:
      Exception
    • readByteArray

      public void readByteArray(DataInput in, int version, boolean fromReportDesigner, quadbase.common.util.internal.FileInMemTable subFilesTable, boolean writeToFileSystem, boolean loadNewOnly) throws Exception
      Throws:
      Exception
    • read

      public void read(DataInput in, int version) throws Exception
      For internal use only.
      Overrides:
      read in class ReportCell
      Throws:
      Exception
    • getSubReport

      public ISubReport getSubReport() throws Exception
      For internal use only. Developers using the API should use getSubReport(IReport qbreport) instead of this method.
      Throws:
      Exception
      See Also:
    • getSubReport

      public ISubReport getSubReport(IReport qbreport) throws Exception
      Returns the contained ISubReport object, which can be class-casted to a SubReport object.
      Parameters:
      qbreport - the parent QbReport object.
      Throws:
      Exception
    • getSubReport

      @Deprecated public ISubReport getSubReport(boolean isEnterpriseServer, boolean optimizeMemory, boolean useBackupData) throws Exception
      Deprecated.
      Use getSubReport(boolean isEnterpriseServer, boolean optimizeMemory, boolean useBackupData, IReport qbreport) instead of this method.
      Throws:
      Exception
      See Also:
    • getSubReport

      public ISubReport getSubReport(boolean isEnterpriseServer, boolean optimizeMemory, boolean useBackupData, IReport ireport) throws Exception
      Returns the contained ISubReport object, which can be class-casted to a SubReport object.
      Parameters:
      isEnterpriseServer - whether to prompt parameter value on clientside
      optimizeMemory - whether to get data in packets to save memory resource
      useBackupData - if true, the returned SubReport object would contain only the 2 rows of backup data. Otherwise, refresh data.
      ireport - the parent QbReport object.
      Throws:
      Exception
    • hasUsableReport

      public boolean hasUsableReport()
      For internal use only
    • setParameterMap

      public void setParameterMap(String[] p)
      For parameterized SubReport only, sets the specified String array as CELL_ID.
    • getParameterMap

      public String[] getParameterMap()
      For parameterized SubReport only, returns a String array of CELL_ID
    • loadReport

      public quadbase.reportdesigner.report.Report loadReport(quadbase.reportdesigner.report.Report mainreport, ReportTable tbl) throws Exception
      For internal use only This method is used when the user loads a report directly from a file and the 'SubReportObject' object has no temporary reference to a 'Report' object. This method will load a report from file using the appropriate parameters from the main report.
      Throws:
      Exception
    • loadReport

      public quadbase.reportdesigner.report.Report loadReport(quadbase.reportdesigner.report.Report mainreport, ReportTable tbl, boolean useDefaultParamValue) throws Exception
      Throws:
      Exception
    • reloadReportWithParameters

      public quadbase.reportdesigner.report.Report reloadReportWithParameters(quadbase.reportdesigner.report.Report subreport, quadbase.reportdesigner.report.Report mainreport, ReportTable tbl) throws Exception
      Throws:
      Exception
    • loadReport_std

      public quadbase.reportdesigner.report.Report loadReport_std(quadbase.reportdesigner.report.Report mainreport, ReportTable tbl, boolean useDefaultParamValue) throws Exception
      internal use only
      Throws:
      Exception
    • reloadReportWithParameters_std

      public quadbase.reportdesigner.report.Report reloadReportWithParameters_std(quadbase.reportdesigner.report.Report subreport, quadbase.reportdesigner.report.Report mainreport, ReportTable tbl) throws Exception
      For internal use only This method is called when the 'SubReportObject' object has a temporary referecne to a 'Report' object. In which case the report object has to be refreshed to reflect any changes made to the main report parameters.
      Throws:
      Exception
    • setBytes

      public void setBytes(byte[] barray) throws Exception
      Set the contained SubReport object. Warning: this method should not be used. Instead, use the SubReport.createSubReport(parentObject, barray) method.
      Parameters:
      barray - the new SubReport object in the byte array format
      Throws:
      Exception
    • getBytes

      public byte[] getBytes() throws Exception
      Returns the contained SubReport as a byte array
      Throws:
      Exception
    • clearReportCache

      public void clearReportCache()
      For internal use only
    • clearReportCache

      public void clearReportCache(double percent)
      For internal use only
    • getCacheSize

      public int getCacheSize()
      return the number of SubReport that will be cached
    • setCacheSize

      public void setCacheSize(int size)
      Set the size of the cache for parameterized sub-reports. The size of the cache cannot be less than 1. If the argument is less than 1, then 1 will be used.
    • setHTMLParameters

      public void setHTMLParameters(String dirLocation, String url, String fileName)
      Not used. Please call this method from the parent QbReport
    • setChartPath

      @Deprecated public void setChartPath(String path)
      Deprecated.
      use setChartPath from the QbReport object.
    • setImagePath

      @Deprecated public void setImagePath(String path)
      Deprecated.
      call this method from the parent QbReport
    • getChartPath

      @Deprecated public String getChartPath()
      Deprecated.
      call this method from the parent QbReport
    • getImagePath

      @Deprecated public String getImagePath()
      Deprecated.
      call this method from the parent QbReport
    • setByteArray

      public void setByteArray(byte[] barray)
      internal use only
    • getByteArray

      public byte[] getByteArray()
      internal use only
    • setSubReport

      public void setSubReport(ISubReport report)
      For internal use only. DO NOT USE THIS METHOD. This method is called as a consequence of the getSubReport method. This is used only in the API to the report reference for idectial subreport objects.
    • getText

      public String getText()
      gets the filename of the sub report
      Overrides:
      getText in class ReportElement
      Returns:
      the text of this element
    • getText

      public String getText(quadbase.common.util.internal.FileInMemTable subFilesTable)
    • isResizeWidth

      public boolean isResizeWidth()
      Whether this SubReportObject resizes its width automatically to fit its contents.
    • setResizeWidth

      public void setResizeWidth(boolean b)
      Sets whether this SubReportObject resizes its width automatically to fit its contents.
    • getCachedSubReport

      public ISubReport getCachedSubReport()
      internal use only
    • deleteSubReportColDataFiles

      public void deleteSubReportColDataFiles()
    • refreshColData

      public void refreshColData()
    • isColDataPopulated

      public boolean isColDataPopulated()
    • setDomainPath

      public void setDomainPath(String path)
    • setDomainAndCheckForUniqueFileName

      public void setDomainAndCheckForUniqueFileName(String path)
    • getDomainPath

      public String getDomainPath()
    • setCustomerQueryForLinkedSubReport

      public void setCustomerQueryForLinkedSubReport(String query)
    • getCustomerQueryForLinkedSubReport

      public String getCustomerQueryForLinkedSubReport()