EspressReport 6.6

quadbase.reportdesigner.ReportAPI
Class DataSheet

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

public class DataSheet
extends java.lang.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 Summary
DataSheet(java.applet.Applet applet, quadbase.reportdesigner.report.ColData[] colData)
          Create a new dataSheet from colData array
DataSheet(java.applet.Applet applet, EJBInfo ejbInfo)
          Create a new dataSheet from IResultset
DataSheet(java.applet.Applet applet, quadbase.common.util.internal.ExcelFileInfo excelInfo)
          Create a new dataSheet from Excel datasource
DataSheet(java.applet.Applet applet, IDatabaseInfo dbInfo)
          Create a new dataSheet from a database
DataSheet(java.applet.Applet applet, IDatabaseInfo dbInfo, boolean doTranspose, int[] transposeColIdx)
          Create a new dataSheet from a database
DataSheet(java.applet.Applet applet, quadbase.common.util.IOLAPResultSet olapRS, java.lang.String connectionString, java.lang.String MDXQuery, java.lang.String uri, java.lang.String datasource, java.lang.String catalog)
           
DataSheet(java.applet.Applet applet, IResultSet data)
          Create a new dataSheet from IResultset
DataSheet(java.applet.Applet applet, IResultSet data, boolean doTranspose, int[] transposeColIdx)
          Create a new dataSheet from IResultset
DataSheet(java.applet.Applet applet, ISpreadSheetModel spreadSheet)
          Create a new dataSheet from spread sheet
DataSheet(java.applet.Applet applet, quadbase.common.paramquery.QueryClassFileInfo queryFileInfo)
           
DataSheet(java.applet.Applet applet, quadbase.common.paramquery.SalesForceQueryFileInfo sfQueryInfo)
          Create a new dataSheet from SalesForce
DataSheet(java.applet.Applet applet, quadbase.common.paramquery.SOAPQueryFileInfo soapInfo)
          Create a new dataSheet from SOAP data source
DataSheet(java.applet.Applet applet, java.lang.String dataFile)
          Create a new dataSheet from a data file
DataSheet(java.applet.Applet applet, java.lang.String dataFile, boolean doTranspose, int[] transposeColIdx, int dataFileType)
          Create a new dataSheet from a data file
DataSheet(java.applet.Applet applet, java.lang.String dataFile, int dataFileType)
          Create a new dataSheet from a data file
DataSheet(java.applet.Applet applet, XMLFileQueryInfo xmlInfo)
          Create a new dataSheet from IResultset
DataSheet(java.applet.Applet applet, XMLFileQueryInfo xmlInfo, boolean doTranspose, int[] transposeColIdx)
          Create a new dataSheet from IResultset
 
Method Summary
 void addRow(java.lang.Object[] record)
          add a new row data
 void deleteRow(int no)
          delete a specified row
 quadbase.reportdesigner.report.ColData[] getColData()
          Return an array of quadbase.reportdesigner.report.ColData
 int getColumnCount()
          returns number of columns
 java.lang.String[] getFieldNames()
          Return the field names in a string array of the datasheet.
 int[] getOriginalDataTypes()
           
 java.lang.Object[] getRow(int no)
          returns specified row data
 int getRowCount()
          returns number of rows
 void print(java.io.PrintStream out, int separator, int format)
          Print Data File
 void updateRow(java.lang.Object[] record, int no)
          update the specified row
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSheet

public DataSheet(java.applet.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(java.applet.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
doTransposeData - a flag denoting whether the input data has to be transposed into
transposeColIdx - transpose selected column index

DataSheet

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

DataSheet

public DataSheet(java.applet.Applet applet,
                 java.lang.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(java.applet.Applet applet,
                 java.lang.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(java.applet.Applet applet,
                 java.lang.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
doTransposeData - a flag denoting whether the input data has to be transposed into
transposeColIdx - transpose selected column index
dataFile - source data file, see database file format for details

DataSheet

public DataSheet(java.applet.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(java.applet.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
doTransposeData - a flag denoting whether the input data has to be transposed into
transposeColIdx - transpose selected column index
dataFile - source data file, see database file format for details

DataSheet

public DataSheet(java.applet.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.
doTransposeData - a flag denoting whether the input data has to be transposed into
transposeColIdx - transpose selected column index
dataFile - source data file, see database file format for details

DataSheet

public DataSheet(java.applet.Applet applet,
                 quadbase.common.paramquery.SOAPQueryFileInfo soapInfo)
Create a new dataSheet from SOAP data source

Parameters:
applet - the applet containing the report. Use "(Applet)null" if used within an application
soapInfo - SOAP data source information

DataSheet

public DataSheet(java.applet.Applet applet,
                 quadbase.common.paramquery.SalesForceQueryFileInfo sfQueryInfo)
Create a new dataSheet from SalesForce

Parameters:
applet - the applet containing the report. Use "(Applet)null" if used within an application
sfQueryInfo - SalesForce query information

DataSheet

public DataSheet(java.applet.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(java.applet.Applet applet,
                 quadbase.common.util.IOLAPResultSet olapRS,
                 java.lang.String connectionString,
                 java.lang.String MDXQuery,
                 java.lang.String uri,
                 java.lang.String datasource,
                 java.lang.String catalog)
Parameters:
applet -
olapRS -
connectionString -
MDXQuery -
uri -
datasource -
catalog -

DataSheet

public DataSheet(java.applet.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(java.applet.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.
doTransposeData - a flag denoting whether the input data has to be transposed into
transposeColIdx - transpose selected column index

DataSheet

public DataSheet(java.applet.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(java.applet.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 Detail

getRowCount

public int getRowCount()
returns number of rows

Returns:
row count

getColumnCount

public int getColumnCount()
returns number of columns

Returns:
column count

getRow

public java.lang.Object[] getRow(int no)
returns specified row data

Parameters:
no - row number
Returns:
object array which containing row data

getFieldNames

public java.lang.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

addRow

public void addRow(java.lang.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(java.lang.Object[] record,
                      int no)
update the specified row

Parameters:
record - the new row data
no - the row number to update

print

public void print(java.io.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


EspressReport 6.6