Interface IInputData


public interface IInputData
This interface defines methods to modify the report's input data properties, including file or database information, and accessing individual records. A handle to an object that implements this interface can be obtained by calling the gethInputData method defined in QbReport.
  • Method Details

    • getMapping

      ColInfo[] getMapping()
      Returns the data column mapping information.

      Returns:
      the report column mapping information
      See Also:
    • setMapping

      void setMapping(ColInfo[] info)
      Set the report column mapping.
      Parameters:
      info - An instance of ColInfo containing the column mappings.
      See Also:
    • getDatabaseInfo

      IDatabaseInfo getDatabaseInfo()
      Gets the database info used for plotting the report. Only valid if the report was created by performing a database query.

      Returns:
      An object containing the database information.
      See Also:
    • setDatabaseInfo

      void setDatabaseInfo(quadbase.common.util.IDatabaseInfo db) throws Exception
      Sets the input database information, which is used to create a report.
      Parameters:
      db - An IDatabaseInfo implementation object containing the database connect info and search query.
      Throws:
      Exception
      See Also:
    • setDatabaseInfo

      void setDatabaseInfo(quadbase.common.util.IDatabaseInfo db, boolean setNewData) throws Exception
      Throws:
      Exception
    • setDatabaseInfo

      void setDatabaseInfo(quadbase.common.util.IDatabaseInfo db, boolean setNewData, boolean sorteddata) throws Exception
      Throws:
      Exception
    • setAllDatabaseInfo

      void setAllDatabaseInfo(String url, String driver, String usr, String pwd) throws Exception
      Sets all database information associated with this report. Any sub-report, drill-down report, and chart that uses a database data source will be changed to use the specified database information as well.
      Parameters:
      url - the url that identifies the database
      driver - the name of the jdbc driver class
      usr - the user name to login to this database, or null
      pwd - the password to login to this database, or null
      Throws:
      Exception
    • setAllDatabaseInfo

      void setAllDatabaseInfo(String url, String driver, String usr, String pwd, boolean setNewData) throws Exception
      Sets all database information associated with this report. Any sub-report, drill-down report, and chart that uses a database data source will be changed to use the specified database information as well.
      Parameters:
      url - the url that identifies the database
      driver - the name of the jdbc driver class
      usr - the user name to login to this database, or null
      pwd - the password to login to this database, or null
      setNewData - whether to hit the database to set new data for the report
      Throws:
      Exception
    • setAllDatabaseInfo

      void setAllDatabaseInfo(String url, String driver, String usr, String pwd, boolean setNewData, boolean sorteddata) throws Exception
      Throws:
      Exception
    • setAllJNDIDatabaseInfo

      void setAllJNDIDatabaseInfo(Hashtable<String,String> env, String jndiName) throws Exception
      Throws:
      Exception
    • setJNDIDatabaseInfo

      void setJNDIDatabaseInfo(quadbase.common.util.IDatabaseInfo dbinfo, boolean setNewData, boolean sorteddata) throws Exception
      Throws:
      Exception
    • replaceAllDatabaseInfo

      void replaceAllDatabaseInfo(String originalUrl, String url, String driver, String usr, String pwd, boolean setNewData) throws Exception
      Replaces all database information associated with this report. Any sub-report, drill-down report, and chart that uses the originalUrl database data source will be changed to use the specified database information. The remaining data sources will remain the same
      Parameters:
      originalUrl - the original database url to replace
      url - the url that identifies the database
      driver - the name of the jdbc driver class
      usr - the user name to login to this database, or null
      pwd - the password to login to this database, or null
      setNewData - whether to hit the database to set new data for the report
      Throws:
      Exception
    • replaceAllDatabaseInfo

      void replaceAllDatabaseInfo(Hashtable<String,Properties> databaseMap, Properties defaultVal, boolean setNewData) throws Exception
      Replaces all database information associated with this report. The hashtable maps old database url to new database Properties. The Properties must include 4 keys (case sensitive):
      • URL - the new database URL
      • DRIVER - the new database Driver
      • USERNAME - the new database username
      • PASSWORD - the new database password
      This method will go through each subreport, drilldown, and chart and check the hashtable for any matches, if a match is made, the database information is replaced. If a match cannot be found and defaultVal is not null, it will replace the database info with the defaultVal Properties. In all other cases the database is unchanged.
      Parameters:
      databaseMap - the map containing previous database url as keys mapped to new database Properties
      defaultVal - if a report/chart is using a database url not found in the databaseMap, it will replace the database information to those contained in defaultVal only if defaultVal is not null.
      setNewData - whether to hit the database to set new data for the report
      Throws:
      Exception
    • setAllDatabaseInfo

      void setAllDatabaseInfo(Connection conn) throws Exception
      Sets all database connection(s) associated with this report. Any sub-report, drill-down report, and chart that uses a database data source will be changed to use the specified database connection as well.
      Parameters:
      conn - the database connection object to use
      Throws:
      Exception
    • setAllDatabaseInfo

      void setAllDatabaseInfo(Connection conn, boolean setNewData) throws Exception
      Sets all database connection(s) associated with this report. Any sub-report, drill-down report, and chart that uses a database data source will be changed to use the specified database connection as well.
      Parameters:
      conn - the database connection object to use
      setNewData - whether to hit the database to set new data for the report
      Throws:
      Exception
    • setAllDatabaseInfo

      void setAllDatabaseInfo(Connection conn, boolean setNewData, boolean sorteddata) throws Exception
      Throws:
      Exception
    • replaceColumns

      void replaceColumns(quadbase.reportdesigner.util.ReplaceColumnInfoList infoList) throws Exception
      Throws:
      Exception
    • getQueryFilename

      String getQueryFilename()
      Gets a query file (*.qry) for plotting the report. A query file is a hard copy of a IQueryFileInfo object, which contains database driver, url, username, password, input parameters(if applicable) and output parameters(if applicable) IQueryFileInfo is a subclass of IDatabaseInfo
      Returns:
      A query file name with extension *.qry return null if no query file is used
      See Also:
    • setQueryFilename

      void setQueryFilename(String filename) throws Exception
      Sets a query file (*.qry) for plotting the report. A query file is a hard copy of a IQueryFileInfo object, which contains database driver, url, username, password, input parameters(if applicable) and output parameters(if applicable) IQueryFileInfo is a subclass of IDatabaseInfo
      Parameters:
      filename - A query file name with extension *.qry
      Throws:
      Exception
      See Also:
    • readQueryFile

      IQueryFileInfo readQueryFile(String filename) throws Exception
      Reads a query file (*.qry) and returns a IQueryFileInfo object.
      Parameters:
      filename - A query file name with extension *.qry
      Returns:
      A IQueryFileInfo object
      Throws:
      Exception
    • setDataFile

      void setDataFile(String fileName) throws IOException
      Sets the input data file, which is used to create a report.

      Parameters:
      fileName - The name of the input data file.
      Throws:
      IOException
    • setDataFile

      void setDataFile(String fileName, boolean sortedData) throws IOException
      Sets the input data file, which is used to create a report.

      Parameters:
      fileName - The name of the input data file.
      sortedData - Specify if the result set is sorted.
      Throws:
      IOException
    • setDataFile

      void setDataFile(String fileName, boolean sortedData, String encoding) throws IOException
      Sets the input data file, which is used to create a report.

      Parameters:
      fileName - The name of the input data file.
      sortedData - Specify if the result set is sorted.
      encoding - The encoding of the file
      Throws:
      IOException
    • getDataFile

      String getDataFile()
      Gets the name of the input data file used to create the report.
      Returns:
      The name of the input data file.
    • setClassFile

      void setClassFile(String className) throws IOException
      Sets the input class file, which is used to create a report.

      Parameters:
      className - The name of the input class.
      Throws:
      IOException
    • setClassFile

      void setClassFile(String className, boolean sortedData) throws IOException
      Sets the input class file, which is used to create a report.

      Parameters:
      className - The name of the input class.
      sortedData - Specify if the result set is sorted.
      Throws:
      IOException
    • setClassFile

      void setClassFile(String className, boolean sortedData, boolean showPromptDialog) throws IOException
      Sets the input class file, which is used to create a report.

      Parameters:
      className - The name of the input class.
      sortedData - Specify if the result set is sorted.
      showPromptDialog - show parameter prompt dialog, false if sub report and the parameter is shared.
      Throws:
      IOException
    • getClassFile

      String getClassFile()
      Gets the name of the input class file used to create the report.
      Returns:
      The name of the input class file.
    • setXMLFileQueryInfo

      void setXMLFileQueryInfo(XMLFileQueryInfo xmlInfo)
      Sets the xml file query info, which is used to create a report.

      Parameters:
      xmlInfo - The XMLFileQueryInfo.
    • setXMLFileQueryInfo

      void setXMLFileQueryInfo(XMLFileQueryInfo xmlInfo, boolean sortedData)
      Sets the xml file query info, which is used to create a report.

      Parameters:
      xmlInfo - The XMLFileQueryInfo.
      sortedData - Specify if the result set is sorted.
    • getXMLFileQueryInfo

      XMLFileQueryInfo getXMLFileQueryInfo()
      Gets the xml file query info used to create the report.
      Returns:
      The XMLFileQueryInfo.
    • setXMLFile

      void setXMLFile(String xmlName) throws IOException
      Sets the input xml file, which is used to create a report.

      Parameters:
      xmlName - The name of the input xml file.
      Throws:
      IOException
    • setXMLFile

      void setXMLFile(String xmlName, boolean sortedData) throws IOException
      Sets the input xml file, which is used to create a report.

      Parameters:
      xmlName - The name of the input xml file.
      sortedData - Specify if the result set is sorted.
      Throws:
      IOException
    • getXMLFile

      String getXMLFile()
      Gets the name of the input xml file used to create the report.
      Returns:
      The name of the input xml file.
    • getDTDFile

      String getDTDFile()
      Gets the name of the input dtd file used to create the report.
      Returns:
      The name of the input dtd file.
    • addRow

      void addRow(IRow r)
      Adds a new row to the report input data.
      Parameters:
      r - An object of type quadbase.reportdesigner.util.IRow
      See Also:
    • deleteRow

      void deleteRow(int rowId)
      Delete a record(row) from the report input data.
      Parameters:
      rowId - The row number to delete.
    • updateRow

      void updateRow(int rowId, IRow r)
      Update the specified row in the report.
      Parameters:
      rowId - The row number to update
      r - The new row values.
      See Also:
    • getRow

      IRow getRow(int rowId)
      Gets the specified row data from the report.
      Parameters:
      rowId - The row number.
      Returns:
      The IRow object containing the row data.
      See Also:
    • getRowCount

      int getRowCount()
      Returns the total number of rows in the input data.
      Returns:
      The total number of rows in the input data set.
    • matchRecord

      int matchRecord(IRow r)
      Get the row number containing the record that matches the input row.
      Parameters:
      r - The IRow object for which the row number is desired.
      Returns:
      The row number in the data set.
      See Also:
    • getData

      IResultSet getData()
      Returns the IResultSet object containing the input report data.
      Returns:
      The IResultSet object.
      See Also:
    • setData

      void setData(IResultSet rs) throws Exception
      Sets the input data for the report using an IResultSet object.
      Parameters:
      rs - The IResultSet object
      Throws:
      Exception
      See Also:
    • setData

      void setData(IResultSet rs, boolean sortedData) throws Exception
      Sets the input data for the report using an IResultSet object. If the result set is sorted, the report can be built more efficiently.
      Parameters:
      rs - The IResultSet object
      sortedData - Specify if the result set is sorted.
      Throws:
      Exception
      See Also:
    • setData

      void setData(IResultSet rs, boolean sortedData, boolean optimizeMemory) throws Exception
      Sets the input data for the report using an IResultSet object. If the result set is sorted, the report can be built more efficiently.
      Parameters:
      rs - The IResultSet object
      sortedData - Specify if the result set is sorted.
      optimizeMemory - Whether data from database would get obtained in chunks to save
      Throws:
      Exception
      See Also:
    • setData

      void setData(IResultSet rs, boolean sortedData, boolean optimizeMemory, Object[] distinctValue) throws Exception
      Sets the input data for the report using an IResultSet object. If the result set is sorted, the report can be built more efficiently.
      Parameters:
      rs - The IResultSet object
      sortedData - Specify if the result set is sorted.
      optimizeMemory - Whether data from database would get obtained in chunks to save
      distinctValue - Distinct value Object array for CrossTab report, used when optimize memory is set to true
      Throws:
      Exception
      See Also:
    • getSpreadSheetModel

      ISpreadSheetModel getSpreadSheetModel()
      Returns the spread sheet model for the report, if one is set.
      See Also:
    • setSpreadSheetModel

      void setSpreadSheetModel(ISpreadSheetModel sheet)
      Sets the report's spread sheet model to the given object.
      Parameters:
      sheet - the spreadsheet model object
      See Also:
    • getExcelFileInfo

      quadbase.common.util.internal.ExcelFileInfo getExcelFileInfo()
      Gets the Excel info used for the report. Only valid if the report was created from Excel data source.
      Returns:
      SalesForce data source information
      See Also:
      • ExcelFileInfo
    • setExcelFileInfo

      void setExcelFileInfo(quadbase.common.util.internal.ExcelFileInfo excelInfo) throws Exception
      Sets the Excel info for the report.
      Parameters:
      excelInfo - Excel data source information
      Throws:
      Exception - if an error occurred
      See Also:
      • ExcelFileInfo