Class DataSheet

java.lang.Object
quadbase.reportdesigner.ReportAPI.DataSheet

public class DataSheet extends Object
This class provides a functionality to merge multiple data sources together. User can create a DataSheet class from a different data sources, for example, data file, database, spreadSheetModel, and IResultSet. And user can use a QbReport constructor for DataSheet array to create a report object.
  • Constructor Details

    • DataSheet

      public DataSheet(Applet applet, IDatabaseInfo dbInfo)
      Create a new dataSheet from a database
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      dbInfo - database information, see interface IDatabaseInfo
    • DataSheet

      public DataSheet(Applet applet, IDatabaseInfo dbInfo, boolean doTranspose, int[] transposeColIdx)
      Create a new dataSheet from a database
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      dbInfo - database information, see interface IDatabaseInfo
      doTranspose - a flag denoting whether the input data has to be transposed into
      transposeColIdx - transpose selected column index
    • DataSheet

      public DataSheet(Applet applet, IDatabaseInfo dbInfo, boolean doTranspose, int[] transposeColIdx, int startIndex, int count)
      Create a new dataSheet from a database
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      dbInfo - database information, see interface IDatabaseInfo
      doTranspose - a flag denoting whether the input data has to be transposed into
      transposeColIdx - transpose selected column index
      startIndex - index of the first record that should be returned (starting from zero)
      count - count of records to return. Use -1 to return all data from startIndex to end
      count -
    • DataSheet

      public DataSheet(Applet applet, quadbase.common.paramquery.QueryClassFileInfo queryFileInfo)
    • DataSheet

      public DataSheet(Applet applet, quadbase.common.paramquery.QueryClassFileInfo queryFileInfo, int startIndex, int count)
    • DataSheet

      public DataSheet(Applet applet, String dataFile)
      Create a new dataSheet from a data file
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      dataFile - source data file, see database file format for details
    • DataSheet

      public DataSheet(Applet applet, String dataFile, int dataFileType)
      Create a new dataSheet from a data file
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      dataFile - source data file, see database file format for details
    • DataSheet

      public DataSheet(Applet applet, String dataFile, int dataFileType, int startIndex, int count)
      Create a new dataSheet from a data file
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      dataFile - source data file, see database file format for details
      startIndex - index of the first record that should be returned (starting from zero)
      count - count of records to return. Use -1 to return all data from startIndex to end
    • DataSheet

      public DataSheet(Applet applet, String dataFile, boolean doTranspose, int[] transposeColIdx, int dataFileType)
      Create a new dataSheet from a data file
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      dataFile - source data file, see database file format for details
      doTranspose - a flag denoting whether the input data has to be transposed into
      transposeColIdx - transpose selected column index
    • DataSheet

      public DataSheet(Applet applet, String dataFile, boolean doTranspose, int[] transposeColIdx, int dataFileType, int startIndex, int count)
      Create a new dataSheet from a data file
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      dataFile - source data file, see database file format for details
      doTranspose - a flag denoting whether the input data has to be transposed into
      transposeColIdx - transpose selected column index
      startIndex - index of the first record that should be returned (starting from zero)
      count - count of records to return. Use -1 to return all data from startIndex to end
    • DataSheet

      public DataSheet(Applet applet, IResultSet data)
      Create a new dataSheet from IResultset
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      data - source data to plot report, see IResultSet for details
    • DataSheet

      public DataSheet(Applet applet, IResultSet data, boolean doTranspose, int[] transposeColIdx)
      Create a new dataSheet from IResultset
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      data - source data to plot report, see IResultSet for details
      doTranspose - a flag denoting whether the input data has to be transposed into
      transposeColIdx - transpose selected column index
      data - source result set
    • DataSheet

      public DataSheet(Applet applet, EJBInfo ejbInfo)
      Create a new dataSheet from IResultset
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      ejbInfo - ejb info object to plot report.
    • DataSheet

      public DataSheet(Applet applet, EJBInfo ejbInfo, int startIndex, int count)
      Create a new dataSheet from IResultset
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      ejbInfo - ejb info object to plot report
      startIndex - index of the first record that should be returned (starting from zero)
      count - count of records to return. Use -1 to return all data from startIndex to end
    • DataSheet

      public DataSheet(Applet applet, quadbase.common.util.internal.ExcelFileInfo excelInfo)
      Create a new dataSheet from Excel datasource
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      excelInfo - Excel data source info
    • DataSheet

      public DataSheet(Applet applet, quadbase.common.util.internal.ExcelFileInfo excelInfo, int startIndex, int count)
      Create a new dataSheet from Excel datasource
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      excelInfo - Excel data source info
      startIndex - index of the first record that should be returned (starting from zero)
      count - count of records to return. Use -1 to return all data from startIndex to end
    • DataSheet

      public DataSheet(Applet applet, quadbase.common.util.IOLAPResultSet olapRS, String connectionString, String MDXQuery, String uri, String datasource, String catalog)
      Parameters:
      applet -
      olapRS -
      connectionString -
      MDXQuery -
      uri -
      datasource -
      catalog -
    • DataSheet

      public DataSheet(Applet applet, XMLFileQueryInfo xmlInfo)
      Create a new dataSheet from IResultset
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      xmlInfo - xml info to plot report.
    • DataSheet

      public DataSheet(Applet applet, XMLFileQueryInfo xmlInfo, boolean doTranspose, int[] transposeColIdx)
      Create a new dataSheet from IResultset
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      xmlInfo - xml info to plot report.
      doTranspose - a flag denoting whether the input data has to be transposed into
      transposeColIdx - transpose selected column index
    • DataSheet

      public DataSheet(Applet applet, XMLFileQueryInfo xmlInfo, boolean doTranspose, int[] transposeColIdx, int startIndex, int count)
      Create a new dataSheet from IResultset
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      xmlInfo - xml info to plot report.
      doTranspose - a flag denoting whether the input data has to be transposed into
      transposeColIdx - transpose selected column index
      startIndex - index of the first record that should be returned (starting from zero)
      count - count of records to return. Use -1 to return all data from startIndex to end
    • DataSheet

      public DataSheet(Applet applet, ISpreadSheetModel spreadSheet)
      Create a new dataSheet from spread sheet
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      spreadSheet - source data model for report, see ISpreadSheetModel for details
    • DataSheet

      public DataSheet(Applet applet, quadbase.reportdesigner.report.ColData[] colData)
      Create a new dataSheet from colData array
      Parameters:
      applet - the applet containing the report. Use "(Applet)null" if used within an application
      colData - array of ColData
  • Method Details

    • getRowCount

      public int getRowCount()
      returns number of rows
      Returns:
      row count
    • getColumnCount

      public int getColumnCount()
      returns number of columns
      Returns:
      column count
    • getRow

      public Object[] getRow(int no)
      returns specified row data
      Parameters:
      no - row number
      Returns:
      object array which containing row data
    • getFieldNames

      public String[] getFieldNames()
      Return the field names in a string array of the datasheet.
    • getOriginalDataTypes

      public int[] getOriginalDataTypes()
      Returns:
      an array of int of the field data type. The Data type follows the specifications of java.sql.Types
    • getOriginalDataTypeNames

      public String[] getOriginalDataTypeNames()
    • addRow

      public void addRow(Object[] record)
      add a new row data
      Parameters:
      record - new row data object
    • deleteRow

      public void deleteRow(int no)
      delete a specified row
      Parameters:
      no - row number of deleted row
    • updateRow

      public void updateRow(Object[] record, int no)
      update the specified row
      Parameters:
      record - the new row data
      no - the row number to update
    • print

      public void print(PrintStream out, int separator, int format)
      Print Data File
      Parameters:
      out - The outputStream. The caller is responsible for closing it.
      separator - Available separators are :
      QbReport.COMMA
      QbReport.SEMICOLON
      QbReport.SPACE
      format - Available foramt are :
      QbReport.TXTFORMAT
      QbReport.XMLFORMAT
    • getColData

      public quadbase.reportdesigner.report.ColData[] getColData()
      Return an array of quadbase.reportdesigner.report.ColData