Class DataSheet
java.lang.Object
quadbase.reportdesigner.ReportAPI.DataSheet
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
ConstructorsConstructorDescriptionCreate a new dataSheet from a data fileDataSheet(Applet applet, String dataFile, boolean doTranspose, int[] transposeColIdx, int dataFileType) Create a new dataSheet from a data fileDataSheet(Applet applet, String dataFile, boolean doTranspose, int[] transposeColIdx, int dataFileType, int startIndex, int count) Create a new dataSheet from a data fileCreate a new dataSheet from a data fileCreate a new dataSheet from a data fileDataSheet(Applet applet, quadbase.common.paramquery.QueryClassFileInfo queryFileInfo, int startIndex, int count) Create a new dataSheet from IResultsetCreate a new dataSheet from IResultsetCreate a new dataSheet from Excel datasourceDataSheet(Applet applet, quadbase.common.util.internal.ExcelFileInfo excelInfo, int startIndex, int count) Create a new dataSheet from Excel datasourceDataSheet(Applet applet, XMLFileQueryInfo xmlInfo) Create a new dataSheet from IResultsetDataSheet(Applet applet, XMLFileQueryInfo xmlInfo, boolean doTranspose, int[] transposeColIdx) Create a new dataSheet from IResultsetDataSheet(Applet applet, XMLFileQueryInfo xmlInfo, boolean doTranspose, int[] transposeColIdx, int startIndex, int count) Create a new dataSheet from IResultsetDataSheet(Applet applet, quadbase.common.util.IOLAPResultSet olapRS, String connectionString, String MDXQuery, String uri, String datasource, String catalog) Create a new dataSheet from colData arrayDataSheet(Applet applet, IDatabaseInfo dbInfo) Create a new dataSheet from a databaseDataSheet(Applet applet, IDatabaseInfo dbInfo, boolean doTranspose, int[] transposeColIdx) Create a new dataSheet from a databaseDataSheet(Applet applet, IDatabaseInfo dbInfo, boolean doTranspose, int[] transposeColIdx, int startIndex, int count) Create a new dataSheet from a databaseDataSheet(Applet applet, IResultSet data) Create a new dataSheet from IResultsetDataSheet(Applet applet, IResultSet data, boolean doTranspose, int[] transposeColIdx) Create a new dataSheet from IResultsetDataSheet(Applet applet, ISpreadSheetModel spreadSheet) Create a new dataSheet from spread sheet -
Method Summary
Modifier and TypeMethodDescriptionvoidadd a new row datavoiddeleteRow(int no) delete a specified rowquadbase.reportdesigner.report.ColData[]Return an array of quadbase.reportdesigner.report.ColDataintreturns number of columnsString[]Return the field names in a string array of the datasheet.String[]int[]Object[]getRow(int no) returns specified row dataintreturns number of rowsvoidprint(PrintStream out, int separator, int format) Print Data Filevoidupdate the specified row
-
Constructor Details
-
DataSheet
Create a new dataSheet from a database- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationdbInfo- database information, see interface IDatabaseInfo
-
DataSheet
Create a new dataSheet from a database- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationdbInfo- database information, see interface IDatabaseInfodoTranspose- a flag denoting whether the input data has to be transposed intotransposeColIdx- 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 applicationdbInfo- database information, see interface IDatabaseInfodoTranspose- a flag denoting whether the input data has to be transposed intotransposeColIdx- transpose selected column indexstartIndex- 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 endcount-
-
DataSheet
-
DataSheet
public DataSheet(Applet applet, quadbase.common.paramquery.QueryClassFileInfo queryFileInfo, int startIndex, int count) -
DataSheet
Create a new dataSheet from a data file- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationdataFile- source data file, see database file format for details
-
DataSheet
Create a new dataSheet from a data file- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationdataFile- source data file, see database file format for details
-
DataSheet
Create a new dataSheet from a data file- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationdataFile- source data file, see database file format for detailsstartIndex- 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 applicationdataFile- source data file, see database file format for detailsdoTranspose- a flag denoting whether the input data has to be transposed intotransposeColIdx- 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 applicationdataFile- source data file, see database file format for detailsdoTranspose- a flag denoting whether the input data has to be transposed intotransposeColIdx- transpose selected column indexstartIndex- 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
Create a new dataSheet from IResultset- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationdata- source data to plot report, see IResultSet for details
-
DataSheet
Create a new dataSheet from IResultset- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationdata- source data to plot report, see IResultSet for detailsdoTranspose- a flag denoting whether the input data has to be transposed intotransposeColIdx- transpose selected column indexdata- source result set
-
DataSheet
Create a new dataSheet from IResultset- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationejbInfo- ejb info object to plot report.
-
DataSheet
Create a new dataSheet from IResultset- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationejbInfo- ejb info object to plot reportstartIndex- 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
Create a new dataSheet from Excel datasource- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationexcelInfo- 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 applicationexcelInfo- Excel data source infostartIndex- 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
Create a new dataSheet from IResultset- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationxmlInfo- 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 applicationxmlInfo- xml info to plot report.doTranspose- a flag denoting whether the input data has to be transposed intotransposeColIdx- 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 applicationxmlInfo- xml info to plot report.doTranspose- a flag denoting whether the input data has to be transposed intotransposeColIdx- transpose selected column indexstartIndex- 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
Create a new dataSheet from spread sheet- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationspreadSheet- source data model for report, see ISpreadSheetModel for details
-
DataSheet
Create a new dataSheet from colData array- Parameters:
applet- the applet containing the report. Use "(Applet)null" if used within an applicationcolData- 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
returns specified row data- Parameters:
no- row number- Returns:
- object array which containing row data
-
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
-
addRow
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
update the specified row- Parameters:
record- the new row datano- the row number to update
-
print
Print Data File- Parameters:
out- The outputStream. The caller is responsible for closing it.separator- Available separators are :
QbReport.COMMA
QbReport.SEMICOLON
QbReport.SPACEformat- Available foramt are :
QbReport.TXTFORMAT
QbReport.XMLFORMAT
-
getColData
public quadbase.reportdesigner.report.ColData[] getColData()Return an array of quadbase.reportdesigner.report.ColData
-