Class QbReportDesigner

java.lang.Object
quadbase.reportdesigner.designer.QbReportDesigner

public class QbReportDesigner extends Object
A Quadbase Espress Report Designer. This class provides the mechanism to open the Report Designer application using an API. Attributes can be set to the QbReportDesigner Object so that it loads a specified report or connects to a specified data source. In addition, the methods in this class provide programmers a way to configure the Report Designer application using pure API.

To open up Report Designer with a specified .rpt file in an "application environment", simply use the following code:

    QbReportDesigner designer =
      new QbReportDesigner(null, "templates/sample.rpt"); //applet == null
    designer.setVisible(true);
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    save report before inserting a drilldown report
    static final int
    save report before launching pageviewer
    static final int
    save report before inserting a sub-report
  • Constructor Summary

    Constructors
    Constructor
    Description
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, String rptFile)
    Allocates a QbReportDesigner Object with a report.
    QbReportDesigner(Object parent, String dataRegistry, boolean newReport)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, String dataRegistry, boolean newReport, int displayRow)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, String dataRegistry, boolean newReport, int displayRow, String[] imagesPath)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, String dataRegistry, boolean newReport, int displayRow, ImagesPath imagesPath)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, String rptFile, int displayRow)
    Allocates a QbReportDesigner Object with a report where the number of rows outputted is limited.
    QbReportDesigner(Object parent, String rptFile, int displayRow, String[] imagesPath)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, String rptFile, int displayRow, ImagesPath imagesPath)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, String classFile, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport, int displayRow, String[] imagesPath)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, boolean newReport)
    Allocates a QbReportDesigner Object with specified database information.
    QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, boolean newReport, int displayRow)
    Allocates a QbReportDesigner Object with specified database.
    QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport, int displayRow)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport, int displayRow, String[] imagesPath)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport, int displayRow, ImagesPath imagesPath)
    Allocates a QbReportDesigner Object with specified parameters.
    QbReportDesigner(Object parent, quadbase.reportdesigner.designer.ReportMain reportMain)
    Internal use only
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adding the DataSourceManagerListener to manipulate the data source tree in the Data Source Manager.
    void
    Disables the Data Source used for the chart.
    void
    Disposes the Window.
    boolean
    Attempt to exit the program.
    Gets a BrowseDirectories object that can be used to set the default browsing directories for different browse dialogs.
    Gets the custom defined functions information.
    Gets a preset list of parameters to be used when defining parameters in a query.
    It is recommended that the setVisible(true) method should be used instead of this method to launch the report designer.
    Gets the JTabbedPane that contains the 'Design', 'SubReport', and 'Preview' tabs.
    Returns the primary design tool bar
    Returns the secondary design tool bar
    quadbase.datasourcemanager.manager.IImportQRYFile
    Gets the imported Query File associated with this Report Designer.
     
    Returns the preview tool bar
    Returns a handle to the Menu Bar of the report.
    Returns the security level name used to open this Report Designer.
    static String
    Returns servlet context
    Deprecated.
    use getBrowseDirectories().getReportTemplatesDirectory() instead.
    boolean
    Gets whether the user is prohibited from browsing any directory above the root directory.
    boolean
    Returns whether setExitOnCanel() is set.
    boolean
    Returns whether the user is forced to create a new report or not.
    static boolean
    Returns whether metric system is used in the Report Designer.
    boolean
    Returns whether to save on exit is enabled.
    boolean
    Returns whether the multiple data source option step should be skipped in the report wizard.
    boolean
    Returns whether the select predefined templates step should be skipped in the report wizard.
    boolean
    Returns whether the query result step should be skipped in the report wizard.
    void
    loadFile(String reportFileName)
    This method is used to load the report file from the API, after setting the relative path.
    void
    loadFile(String reportFileName, boolean repaint)
     
    void
    login(String designerPassword)
    if QbDesignerPassword is required for server, using [-QbDesignerPassword] flag please pass in QbDesigner password to login QbReportDesigner before calling setVisible(...) or getDesigner(...) methods
    void
    login(String userName, String password)
    if server requires login, using [-RequireLogin] flag please pass in userName and password to login QbReportDesigner before calling setVisible(...) or getDesigner(...) methods
    void
    modifyWarningMessage(int modifiedMsg, String newMessage)
    Modify display warning message:
    SAVE_RPT_BEFORE_DRILLDOWN - save report before inserting a drilldown report
    SAVE_RPT_BEFORE_SUBREPORT - save report before inserting a subreport
    SAVE_RPT_EBFORE_PAGEVIEWER - save report before launching pageviewer
    void
    Removes the DataSourceManagerListener.
    void
    Saves the report at its original location.
    void
    save(String fileLocation)
    Saves the report at fileLocation.
    void
    Pops up the Save As Dialog for the user to browse the save location.
    static void
    Static method to set the browse root directory, which is the upper bound when the user browse the directories of the server.
    void
    setByPassSaveAsIO(quadbase.reportdesigner.designer.IByPassSaveAsForReport saveAsIO)
    Sets by pass save as IO by implementing IByPassSaveAsForReport interface
    void
    setChartDesignerHandle(quadbase.reportdesigner.designer.IChartHandle cdHandle)
    modify chart designer by implementing IChartHandle interface
    void
    Sets where and how charts get saved by passing in an argument chartIO that holds information on how to perform chart file IO.
    void
    setChartMenuEnabled(int menu, boolean enabled)
    Sets whether the specified chart menu is enabled.
    void
    setChartMenuItemEnabled(int menu, int item, boolean enabled)
    Sets whether the specified chart menu item is enabled.
    void
    setChartToolbarEnabled(int button, boolean enabled)
    Sets a button on the chart tool bar enabled or disabled.
    void
    You may include your own functions with the Formula an Scripts dialog boxes that the users can use when calling Report Designer from the API.
    void
    setDataRegistry(String dataRegistry)
    Sets the Data Registry to be used for the data source.
    void
    Sets the Database provider.
    static void
    setDebugMode(int mode)
    set debug mode to print out debug statement
    static void
    set debug mode to print out debug statement
    void
    Internal use only.
    void
    Sets whether the user is prohibited from browsing any directory above the root directory.
    void
    setDisplayRow(int nRow)
    Sets a limit on the number of rows to be displayed by the report.
    void
    setDrillDownReportIO(quadbase.reportdesigner.designer.IDrillDownReportIO drptIO)
    Restrict the directory where the user of the Report Designer will be able to save their Drill Down report or Sub-Report (.rpt) files using a IDrillDownReportIO.
    void
    setExitOnCancel(boolean state)
    Set whether program should exit after clicking on any cancel button in the program.
    void
    setForceNewReport(boolean state)
    Forces the user to create a new report when Report Designer is loaded.
    void
    setImportQRYFile(quadbase.datasourcemanager.manager.IImportQRYFile f)
    Sets an IImportQRYFile Object to be used with this Report Designer.
    static void
    setLookAndFeel(LookAndFeel newLookAndFeel)
    Sets the look and feel of the designer UI.
    static void
    setMetricSystemUsed(boolean useMetric)
    Sets whether to use the metric system in the Report Designer.
    void
    Sets the reports path relative to ERES
    void
    Restrict the directory where the user of the Report Designer will be able to save their .rpt files using an IReportIO.
    void
    Sets a root directory for the user.
    void
    Sets whether to save the report when quitting the Report Designer.
    void
    Sets the "security level" used to open this Report Designer.
    static void
    Set the server address of EspressManager.
    static void
    Set the list of host names for EspressManager when tunneling is used.
    static void
    Set the port number of EspressManager.
    static void
    set servlet context
    static void
    setServletHttpHeader(String headerName, String headerValue)
    Static method to set extra HTTP header that is sent with every request to ESMMessageServlet.
    static void
    Set servlet runner hostname and port number.
    void
    Specify whether the multiple data source option step should be skipped in the report wizard.
    void
    Specify whether the select predefined templates step should be skipped in the report wizard.
    void
    Specify whether the query result step should be skipped in the report wizard.
    void
    setSysExitOnExit(boolean state)
    Sets the state of whether System.exit() is called when the user selects File->Exit or click on the X button on the top right corner of the designer dialog.
    void
    Deprecated.
    use getBrowseDirectories().setReportTemplatesDirectory(String) instead.
    static void
    setUseSysResourceImages(boolean state)
    Sets whether to use images in JAR files (ReportDesigner.jar) or other resource that can be loaded by ClassLoader.getSystemResource(imagesPath).
    void
    setVisible(boolean b)
    Calling this method with 'true' argument will launch the report designer and start the wizard if necessary.
    boolean
    Gets the state of whether System.exit() is called when the user selects File->Exit or click on the X button on the top right corner of the designer dialog.
    static void
    useServlet(boolean b)
    Determines whether to use SOCKET or HTTP or SERVLET for chart server connection Note that this static method MUST be called before any QbChart constructor.
    static boolean
    Gets whether to use images in JAR files (ReportDesigner.jar) or other resource that can be loaded by ClassLoader.getSystemResource(imagesPath).
    void
    writeFile(String filename, byte[] content)
    Allow user to create or overwrite a file on the server.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SAVE_RPT_BEFORE_DRILLDOWN

      public static final int SAVE_RPT_BEFORE_DRILLDOWN
      save report before inserting a drilldown report
      See Also:
    • SAVE_RPT_BEFORE_SUBREPORT

      public static final int SAVE_RPT_BEFORE_SUBREPORT
      save report before inserting a sub-report
      See Also:
    • SAVE_RPT_BEFORE_PAGEVIEWER

      public static final int SAVE_RPT_BEFORE_PAGEVIEWER
      save report before launching pageviewer
      See Also:
  • Constructor Details

    • QbReportDesigner

      public QbReportDesigner(Object parent, quadbase.reportdesigner.designer.ReportMain reportMain)
      Internal use only
    • QbReportDesigner

      public QbReportDesigner(Object parent)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
    • QbReportDesigner

      public QbReportDesigner(Object parent, String rptFile)
      Allocates a QbReportDesigner Object with a report.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      rptFile - the path to a report (.rpt) file
    • QbReportDesigner

      public QbReportDesigner(Object parent, String rptFile, int displayRow)
      Allocates a QbReportDesigner Object with a report where the number of rows outputted is limited.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      rptFile - the path to a report (.rpt) file
      displayRow - sets the limit on the number of rows to be displayed
    • QbReportDesigner

      public QbReportDesigner(Object parent, String rptFile, int displayRow, String[] imagesPath)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      rptFile - the path to a report (.rpt) file
      displayRow - sets the limit on the number of rows to be displayed
      imagesPath - a String array of length 3 with the following properties:
      imagesPath[0] a String that specifies the path to report images.
      imagesPath[1] a String that specifies the path to chart images.
      imagesPath[2] a String that specifies the path to background images.
    • QbReportDesigner

      public QbReportDesigner(Object parent, String rptFile, int displayRow, ImagesPath imagesPath)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      rptFile - the path to a report (.rpt) file
      displayRow - sets the limit on the number of rows to be displayed
      imagesPath - an ImagesPath Object that stores information about the paths to images on the system.
    • QbReportDesigner

      public QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, boolean newReport)
      Allocates a QbReportDesigner Object with specified database information.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      dbInfo - a DBInfoBasic Object that stores Database Information
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
    • QbReportDesigner

      public QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, boolean newReport, int displayRow)
      Allocates a QbReportDesigner Object with specified database.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      dbInfo - a DBInfoBasic Object that stores Database Information
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
      displayRow - sets the limit on the number of rows to be displayed.
    • QbReportDesigner

      public QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      inSet - a QueryInParamSet Object that holds parameter information to Queries that will be used to query the database
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
    • QbReportDesigner

      public QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport, int displayRow)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      inSet - a QueryInParamSet Object that holds parameter information to Queries that will be used to query the database
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
      displayRow - sets the limit on the number of rows to be displayed.
    • QbReportDesigner

      public QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport, int displayRow, String[] imagesPath)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      inSet - a QueryInParamSet Object that holds parameter information to Queries that will be used to query the database
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
      displayRow - sets the limit on the number of rows to be displayed.
      imagesPath - a String array of length 3 with the following properties:
      imagesPath[0] a String that specifies the path to report images.
      imagesPath[1] a String that specifies the path to chart images.
      imagesPath[2] a String that specifies the path to background images.
    • QbReportDesigner

      public QbReportDesigner(Object parent, String classFile, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport, int displayRow, String[] imagesPath)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      classFile - the class path for class file data source
      inSet - a QueryInParamSet Object that holds parameter information to Queries that will be used to query the database
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
      displayRow - sets the limit on the number of rows to be displayed.
      imagesPath - a String array of length 3 with the following properties:
      imagesPath[0] a String that specifies the path to report images.
      imagesPath[1] a String that specifies the path to chart images.
      imagesPath[2] a String that specifies the path to background images.
    • QbReportDesigner

      public QbReportDesigner(Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport, int displayRow, ImagesPath imagesPath)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      inSet - a QueryInParamSet Object that holds parameter information to Queries that will be used to query the database
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
      displayRow - sets the limit on the number of rows to be displayed.
      imagesPath - an ImagesPath Object that stores information about the paths to images on the system.
    • QbReportDesigner

      public QbReportDesigner(Object parent, String dataRegistry, boolean newReport)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      dataRegistry - a specified path to a .xml file for the Data Registry to be used for the data source.
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
    • QbReportDesigner

      public QbReportDesigner(Object parent, String dataRegistry, boolean newReport, int displayRow)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      dataRegistry - a specified path to a .xml file for the Data Registry to be used for the data source.
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
      displayRow - sets the limit on the number of rows to be displayed.
    • QbReportDesigner

      public QbReportDesigner(Object parent, String dataRegistry, boolean newReport, int displayRow, String[] imagesPath)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      dataRegistry - a specified path to a .xml file for the Data Registry to be used for the data source.
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
      displayRow - sets the limit on the number of rows to be displayed.
      imagesPath - a String array of length 3 with the following properties:
      imagesPath[0] a String that specifies the path to report images.
      imagesPath[1] a String that specifies the path to chart images.
      imagesPath[2] a String that specifies the path to background images.
    • QbReportDesigner

      public QbReportDesigner(Object parent, String dataRegistry, boolean newReport, int displayRow, ImagesPath imagesPath)
      Allocates a QbReportDesigner Object with specified parameters.
      Parameters:
      parent - an Object of the type or subclass of type java.awt.Component
      dataRegistry - a specified path to a .xml file for the Data Registry to be used for the data source.
      newReport - true = start from Data Source Manager, false = start from choosing whether to create a new report or open an existing report choice before going to Data Source Manager.
      displayRow - sets the limit on the number of rows to be displayed.
      imagesPath - an ImagesPath Object that stores information about the paths to images on the system.
  • Method Details

    • setDataRegistry

      public void setDataRegistry(String dataRegistry)
      Sets the Data Registry to be used for the data source.
      Parameters:
      dataRegistry - a specified path to a .xml file for the Data Registry to be used for the data source.
    • setLookAndFeel

      public static void setLookAndFeel(LookAndFeel newLookAndFeel)
       Sets the look and feel of the designer UI.
       User has to call this method before calling QbReportDesigner constructor.
       If UIManager.setLookAndFeel(newLookAndFeel) throws exception, this method
       does nothing.
       
      Sample use of this method can be one of the following: QbReportDesigner.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel()); //Java Metal QbReportDesigner.setLookAndFeel(new com.sun.java.swing.plaf.windows.WindowsLookAndFeel()); //Windows QbReportDesigner.setLookAndFeel(new com.sun.java.swing.plaf.motif.MotifLookAndFeel()); // MOTIF UI
    • getLookAndFeel

      public static LookAndFeel getLookAndFeel()
    • setDebugMode

      public static void setDebugMode(String mode)
      set debug mode to print out debug statement
    • setDebugMode

      public static void setDebugMode(int mode)
      set debug mode to print out debug statement
    • getDesigner

      public JFrame getDesigner()
      It is recommended that the setVisible(true) method should be used instead of this method to launch the report designer. Use this method after calling setVisible(true) to get a reference to the designer JFrame object.
    • setVisible

      public void setVisible(boolean b)
      Calling this method with 'true' argument will launch the report designer and start the wizard if necessary.
    • login

      public void login(String userName, String password)
      if server requires login, using [-RequireLogin] flag please pass in userName and password to login QbReportDesigner before calling setVisible(...) or getDesigner(...) methods
    • login

      public void login(String designerPassword)
      if QbDesignerPassword is required for server, using [-QbDesignerPassword] flag please pass in QbDesigner password to login QbReportDesigner before calling setVisible(...) or getDesigner(...) methods
    • dispose

      public void dispose()
      Disposes the Window.
    • setReportIO

      public void setReportIO(IReportIO rptIO)
      Restrict the directory where the user of the Report Designer will be able to save their .rpt files using an IReportIO.
    • setByPassSaveAsIO

      public void setByPassSaveAsIO(quadbase.reportdesigner.designer.IByPassSaveAsForReport saveAsIO)
      Sets by pass save as IO by implementing IByPassSaveAsForReport interface
    • setDrillDownReportIO

      public void setDrillDownReportIO(quadbase.reportdesigner.designer.IDrillDownReportIO drptIO)
      Restrict the directory where the user of the Report Designer will be able to save their Drill Down report or Sub-Report (.rpt) files using a IDrillDownReportIO.
    • setChartDesignerHandle

      public void setChartDesignerHandle(quadbase.reportdesigner.designer.IChartHandle cdHandle)
      modify chart designer by implementing IChartHandle interface
    • modifyWarningMessage

      public void modifyWarningMessage(int modifiedMsg, String newMessage)
      Modify display warning message:
      SAVE_RPT_BEFORE_DRILLDOWN - save report before inserting a drilldown report
      SAVE_RPT_BEFORE_SUBREPORT - save report before inserting a subreport
      SAVE_RPT_EBFORE_PAGEVIEWER - save report before launching pageviewer
    • getReportMenuBar

      public JMenuBar getReportMenuBar()
      Returns a handle to the Menu Bar of the report.
    • getDesignerToolBar

      public JToolBar getDesignerToolBar()
      Returns the primary design tool bar
    • getDesignerToolBar2

      public JToolBar getDesignerToolBar2()
      Returns the secondary design tool bar
    • getPreviewToolBar

      public JToolBar getPreviewToolBar()
      Returns the preview tool bar
    • setSaveOnExitEnabled

      public void setSaveOnExitEnabled(boolean b)
      Sets whether to save the report when quitting the Report Designer.
    • isSaveOnExitEnabled

      public boolean isSaveOnExitEnabled()
      Returns whether to save on exit is enabled.
    • saveAs

      public void saveAs()
      Pops up the Save As Dialog for the user to browse the save location.
    • save

      public void save()
      Saves the report at its original location. Overwrites the original.
    • save

      public void save(String fileLocation)
      Saves the report at fileLocation.
    • writeFile

      public void writeFile(String filename, byte[] content) throws Exception
      Allow user to create or overwrite a file on the server.
      Parameters:
      filename - The name of the file.
      content - The content of the file.
      Throws:
      Exception
    • setDisplayRow

      public void setDisplayRow(int nRow)
      Sets a limit on the number of rows to be displayed by the report.
    • setRootDirectoryForBrowse

      public void setRootDirectoryForBrowse(String browseRoot)
      Sets a root directory for the user. After calling this method, the user is prohibited from browsing any directory above the root directory.
    • getBrowseDirectories

      public BrowseDirectories getBrowseDirectories()
      Gets a BrowseDirectories object that can be used to set the default browsing directories for different browse dialogs.
    • setDirectoryBrowseUpEnabled

      public void setDirectoryBrowseUpEnabled(boolean state)
      Sets whether the user is prohibited from browsing any directory above the root directory.
    • isDirectoryBrowseUpEnabled

      public boolean isDirectoryBrowseUpEnabled()
      Gets whether the user is prohibited from browsing any directory above the root directory.
    • setDBProvider

      public void setDBProvider(IDBProvider provider)
      Sets the Database provider.
      Parameters:
      provider - a IDBProvider Object that has information about the database provider to be set.
    • exit

      public boolean exit() throws Exception
      Attempt to exit the program.
      Throws:
      Exception
    • setExitOnCancel

      public void setExitOnCancel(boolean state)
      Set whether program should exit after clicking on any cancel button in the program.
    • isExitOnCancel

      public boolean isExitOnCancel()
      Returns whether setExitOnCanel() is set.
    • setForceNewReport

      public void setForceNewReport(boolean state)
      Forces the user to create a new report when Report Designer is loaded.
    • isForceNewReport

      public boolean isForceNewReport()
      Returns whether the user is forced to create a new report or not.
    • setDefaultParamNames

      public void setDefaultParamNames(String[] names)
      Internal use only. Specify a preset list of parameters to be used when defining parameters in a query.
    • getDefaultParamNames

      public String[] getDefaultParamNames()
      Gets a preset list of parameters to be used when defining parameters in a query.
    • addDataSourceManagerListener

      public void addDataSourceManagerListener(DataSourceManagerListener listener)
      Adding the DataSourceManagerListener to manipulate the data source tree in the Data Source Manager.
    • removeDataSourceManagerListener

      public void removeDataSourceManagerListener(DataSourceManagerListener listener)
      Removes the DataSourceManagerListener.
    • setCustomDefinedFunctions

      public void setCustomDefinedFunctions(ICustomDefinedFunctions f)
      You may include your own functions with the Formula an Scripts dialog boxes that the users can use when calling Report Designer from the API. Simply create a class that extends the ICustomDefinedFunctions interface and pass it in as an argument.
    • getCustomDefinedFunctions

      public ICustomDefinedFunctions getCustomDefinedFunctions()
      Gets the custom defined functions information.
    • setImportQRYFile

      public void setImportQRYFile(quadbase.datasourcemanager.manager.IImportQRYFile f)
      Sets an IImportQRYFile Object to be used with this Report Designer. This is used to alter the functionality of the import query file button inside the data source manager. After this set is done, the importQRYFile() method of the IImportQRYFile Object is called when the user clicks on the import query file button.
    • getImportQRYFile

      public quadbase.datasourcemanager.manager.IImportQRYFile getImportQRYFile()
      Gets the imported Query File associated with this Report Designer.
    • setChartMenuItemEnabled

      public void setChartMenuItemEnabled(int menu, int item, boolean enabled)
      Sets whether the specified chart menu item is enabled.
      Parameters:
      menu - the menu name
      item - the menu item name
      enabled - true == enabled, false == not enabled
    • setChartMenuEnabled

      public void setChartMenuEnabled(int menu, boolean enabled)
      Sets whether the specified chart menu is enabled.
      Parameters:
      menu - the menu name
      enabled - true == enabled, false == not enabled
    • setChartToolbarEnabled

      public void setChartToolbarEnabled(int button, boolean enabled)
      Sets a button on the chart tool bar enabled or disabled.
      Parameters:
      button - the index to the button
      enabled - true if and only if enabled
    • disableChartDataSource

      public void disableChartDataSource()
      Disables the Data Source used for the chart.
    • setChartIO

      public void setChartIO(IChartIO chartIO)
      Sets where and how charts get saved by passing in an argument chartIO that holds information on how to perform chart file IO.
    • setMetricSystemUsed

      public static void setMetricSystemUsed(boolean useMetric)
      Sets whether to use the metric system in the Report Designer.
    • isMetricSystemUsed

      public static boolean isMetricSystemUsed()
      Returns whether metric system is used in the Report Designer.
    • setSkipQueryResultStep

      public void setSkipQueryResultStep(boolean b)
      Specify whether the query result step should be skipped in the report wizard.
    • isSkipQueryResultStep

      public boolean isSkipQueryResultStep()
      Returns whether the query result step should be skipped in the report wizard. The default value is false.
    • setSkipMultiDataSourceStep

      public void setSkipMultiDataSourceStep(boolean b)
      Specify whether the multiple data source option step should be skipped in the report wizard.
    • isSkipMultiDataSourceStep

      public boolean isSkipMultiDataSourceStep()
      Returns whether the multiple data source option step should be skipped in the report wizard. The default value is false.
    • setSkipPredefinedTemplatesStep

      public void setSkipPredefinedTemplatesStep(boolean b)
      Specify whether the select predefined templates step should be skipped in the report wizard.
    • isSkipPredefinedTemplatesStep

      public boolean isSkipPredefinedTemplatesStep()
      Returns whether the select predefined templates step should be skipped in the report wizard. The default value is false.
    • setSecurityLevel

      public void setSecurityLevel(String level)
      Sets the "security level" used to open this Report Designer. Users who use a particular "security level" setting to open the Report Designer will have restricted access to what the Administrator have configured for that particular "security level".
      Parameters:
      level - the name of the security level.
    • getSecurityLevel

      public String getSecurityLevel()
      Returns the security level name used to open this Report Designer.
    • setTemplatesDirectory

      @Deprecated public void setTemplatesDirectory(String temp_dir)
      Deprecated.
      use getBrowseDirectories().setReportTemplatesDirectory(String) instead. Set the templates directory. Open and save dialogs will initialize to this directory. The template directory must be relative to the working directory. The default is 'Templates/'.
    • getTemplatesDirectory

      @Deprecated public String getTemplatesDirectory()
      Deprecated.
      use getBrowseDirectories().getReportTemplatesDirectory() instead. Returns the templates directory. Open and save dialogs will initialize to this directory.
    • setServerAddress

      public static void setServerAddress(String address) throws UnknownHostException
      Set the server address of EspressManager. Use this address instead of the one provided in the espressmanager.cfg file. It also eliminates the need of the espressmanager.cfg file in the working directory.
      Throws:
      UnknownHostException
    • setServerPortNumber

      public static void setServerPortNumber(int port)
      Set the port number of EspressManager. Use this port number instead of the one provided in the espressmanager.cfg file. It also eliminates the need of the espressmanager.cfg file in the working directory.
    • setServerHosts

      public static void setServerHosts(Vector hostnames)
      Set the list of host names for EspressManager when tunneling is used. Use these hosts along with the ones provided in the espressmanager.cfg file. If the espressmanager.cfg file is not present, then only these hosts will be used.
    • setServletRunner

      public static void setServletRunner(String comm_url)
      Set servlet runner hostname and port number. Note: this static method MUST be called before any QbChart constructor
      Parameters:
      comm_url - servlet runner hostname and port number
    • useServlet

      public static void useServlet(boolean b)
      Determines whether to use SOCKET or HTTP or SERVLET for chart server connection Note that this static method MUST be called before any QbChart constructor.
      Parameters:
      b - If true use SERVLET connection, otherwise use other connection The default value is false.
    • setServletContext

      public static void setServletContext(String context)
      set servlet context
    • getServletContext

      public static String getServletContext()
      Returns servlet context
    • setSysExitOnExit

      public void setSysExitOnExit(boolean state)
      Sets the state of whether System.exit() is called when the user selects File->Exit or click on the X button on the top right corner of the designer dialog.
      Parameters:
      state - the state
    • sysExitOnExit

      public boolean sysExitOnExit()
      Gets the state of whether System.exit() is called when the user selects File->Exit or click on the X button on the top right corner of the designer dialog.
      Returns:
      the current state
    • setUseSysResourceImages

      public static void setUseSysResourceImages(boolean state)
      Sets whether to use images in JAR files (ReportDesigner.jar) or other resource that can be loaded by ClassLoader.getSystemResource(imagesPath).
      Parameters:
      state - the state
    • useSysResourceImages

      public static boolean useSysResourceImages()
      Gets whether to use images in JAR files (ReportDesigner.jar) or other resource that can be loaded by ClassLoader.getSystemResource(imagesPath).
      Returns:
      the state
    • getDesignerTabbedPane

      public JTabbedPane getDesignerTabbedPane()
      Gets the JTabbedPane that contains the 'Design', 'SubReport', and 'Preview' tabs. Selecting different tabs causes the ChangeListener to be invoked. Users can override/extend the behavior of the ChangeListener for this JTabbedPane.
    • setPathRelativeToERES

      public void setPathRelativeToERES(String path)
      Sets the reports path relative to ERES
    • loadFile

      public void loadFile(String reportFileName)
      This method is used to load the report file from the API, after setting the relative path. And it won't trigger the ReportWizard asking for opening existing report or create new report, caused by method QbReportDesigner.getDesigner()
    • loadFile

      public void loadFile(String reportFileName, boolean repaint)
    • setBrowseRootDirectory

      public static void setBrowseRootDirectory(String browseRootDir)
      Static method to set the browse root directory, which is the upper bound when the user browse the directories of the server. Also, if browse root is set, the "Go Up" button will be disabled when the path reaches the root
      Parameters:
      browseRootDir - : MUST be the absolute path, and the user is responsible to make sure the path is correct
    • setServletHttpHeader

      public static void setServletHttpHeader(String headerName, String headerValue)
      Static method to set extra HTTP header that is sent with every request to ESMMessageServlet. This header can be used to filter servlet requests.
      Parameters:
      headerName - : name of HTTP header
      headerValue - : value of HTTP header