EspressReport 6.6

quadbase.reportdesigner.designer
Class QbReportDesigner

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

public class QbReportDesigner
extends java.lang.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
static int SAVE_RPT_BEFORE_DRILLDOWN
          save report before inserting a drilldown report
static int SAVE_RPT_BEFORE_PAGEVIEWER
          save report before launching pageviewer
static int SAVE_RPT_BEFORE_SUBREPORT
          save report before inserting a sub-report
 
Constructor Summary
QbReportDesigner(java.lang.Object parent)
          Allocates a QbReportDesigner Object with specified parameters.
QbReportDesigner(java.lang.Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, boolean newReport)
          Allocates a QbReportDesigner Object with specified database information.
QbReportDesigner(java.lang.Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, boolean newReport, int displayRow)
          Allocates a QbReportDesigner Object with specified database.
QbReportDesigner(java.lang.Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport)
          Allocates a QbReportDesigner Object with specified parameters.
QbReportDesigner(java.lang.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(java.lang.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(java.lang.Object parent, quadbase.common.util.internal.DBInfoBasic dbInfo, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport, int displayRow, java.lang.String[] imagesPath)
          Allocates a QbReportDesigner Object with specified parameters.
QbReportDesigner(java.lang.Object parent, quadbase.reportdesigner.designer.ReportMain reportMain)
          Internal use only
QbReportDesigner(java.lang.Object parent, java.lang.String rptFile)
          Allocates a QbReportDesigner Object with a report.
QbReportDesigner(java.lang.Object parent, java.lang.String dataRegistry, boolean newReport)
          Allocates a QbReportDesigner Object with specified parameters.
QbReportDesigner(java.lang.Object parent, java.lang.String dataRegistry, boolean newReport, int displayRow)
          Allocates a QbReportDesigner Object with specified parameters.
QbReportDesigner(java.lang.Object parent, java.lang.String dataRegistry, boolean newReport, int displayRow, ImagesPath imagesPath)
          Allocates a QbReportDesigner Object with specified parameters.
QbReportDesigner(java.lang.Object parent, java.lang.String dataRegistry, boolean newReport, int displayRow, java.lang.String[] imagesPath)
          Allocates a QbReportDesigner Object with specified parameters.
QbReportDesigner(java.lang.Object parent, java.lang.String rptFile, int displayRow)
          Allocates a QbReportDesigner Object with a report where the number of rows outputted is limited.
QbReportDesigner(java.lang.Object parent, java.lang.String rptFile, int displayRow, ImagesPath imagesPath)
          Allocates a QbReportDesigner Object with specified parameters.
QbReportDesigner(java.lang.Object parent, java.lang.String rptFile, int displayRow, java.lang.String[] imagesPath)
          Allocates a QbReportDesigner Object with specified parameters.
QbReportDesigner(java.lang.Object parent, java.lang.String classFile, quadbase.common.paramquery.QueryInParamSet inSet, boolean newReport, int displayRow, java.lang.String[] imagesPath)
          Allocates a QbReportDesigner Object with specified parameters.
 
Method Summary
 void addDataSourceManagerListener(DataSourceManagerListener listener)
          Adding the DataSourceManagerListener to manipulate the data source tree in the Data Source Manager.
 void disableChartDataSource()
          Disables the Data Source used for the chart.
 void dispose()
          Disposes the Window.
 boolean exit()
          Attempt to exit the program.
 BrowseDirectories getBrowseDirectories()
          Gets a BrowseDirectories object that can be used to set the default browsing directories for different browse dialogs.
 ICustomDefinedFunctions getCustomDefinedFunctions()
          Gets the custom defined functions information.
 java.lang.String[] getDefaultParamNames()
          Gets a preset list of parameters to be used when defining parameters in a query.
 javax.swing.JFrame getDesigner()
          It is recommended that the setVisible(true) method should be used instead of this method to launch the report designer.
 javax.swing.JTabbedPane getDesignerTabbedPane()
          Gets the JTabbedPane that contains the 'Design', 'SubReport', and 'Preview' tabs.
 javax.swing.JToolBar getDesignerToolBar()
          Returns the primary design tool bar
 javax.swing.JToolBar getDesignerToolBar2()
          Returns the secondary design tool bar
 quadbase.datasourcemanager.manager.IImportQRYFile getImportQRYFile()
          Gets the imported Query File associated with this Report Designer.
static javax.swing.LookAndFeel getLookAndFeel()
           
 javax.swing.JToolBar getPreviewToolBar()
          Returns the preview tool bar
 javax.swing.JMenuBar getReportMenuBar()
          Returns a handle to the Menu Bar of the report.
 java.lang.String getSecurityLevel()
          Returns the security level name used to open this Report Designer.
static java.lang.String getServletContext()
          Returns servlet context
 java.lang.String getTemplatesDirectory()
          Deprecated. use getBrowseDirectories().getReportTemplatesDirectory() instead. Returns the templates directory. Open and save dialogs will initialize to this directory.
 boolean isDirectoryBrowseUpEnabled()
          Gets whether the user is prohibited from browsing any directory above the root directory.
 boolean isExitOnCancel()
          Returns whether setExitOnCanel() is set.
 boolean isForceNewReport()
          Returns whether the user is forced to create a new report or not.
static boolean isMetricSystemUsed()
          Returns whether metric system is used in the Report Designer.
 boolean isSaveOnExitEnabled()
          Returns whether to save on exit is enabled.
 boolean isSkipMultiDataSourceStep()
          Returns whether the multiple data source option step should be skipped in the report wizard.
 boolean isSkipPredefinedTemplatesStep()
          Returns whether the select predefined templates step should be skipped in the report wizard.
 boolean isSkipQueryResultStep()
          Returns whether the query result step should be skipped in the report wizard.
 void loadFile(java.lang.String reportFileName)
          This method is used to load the report file from the API, after setting the relative path.
 void loadFile(java.lang.String reportFileName, boolean repaint)
           
 void login(java.lang.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(java.lang.String userName, java.lang.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, java.lang.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 removeDataSourceManagerListener(DataSourceManagerListener listener)
          Removes the DataSourceManagerListener.
 void save()
          Saves the report at its original location.
 void save(java.lang.String fileLocation)
          Saves the report at fileLocation.
 void saveAs()
          Pops up the Save As Dialog for the user to browse the save location.
static void setBrowseRootDirectory(java.lang.String browseRootDir)
          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 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.
 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 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.
 void setDataRegistry(java.lang.String dataRegistry)
          Sets the Data Registry to be used for the data source.
 void setDBProvider(IDBProvider provider)
          Sets the Database provider.
static void setDebugMode(int mode)
          set debug mode to print out debug statement
static void setDebugMode(java.lang.String mode)
          set debug mode to print out debug statement
 void setDefaultParamNames(java.lang.String[] names)
          Internal use only.
 void setDirectoryBrowseUpEnabled(boolean state)
          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(javax.swing.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 setPathRelativeToERES(java.lang.String path)
          Sets the reports path relative to ERES
 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.
 void setRootDirectoryForBrowse(java.lang.String browseRoot)
          Sets a root directory for the user.
 void setSaveOnExitEnabled(boolean b)
          Sets whether to save the report when quitting the Report Designer.
 void setSecurityLevel(java.lang.String level)
          Sets the "security level" used to open this Report Designer.
static void setServerAddress(java.lang.String address)
          Set the server address of EspressManager.
static void setServerHosts(java.util.Vector hostnames)
          Set the list of host names for EspressManager when tunneling is used.
static void setServerPortNumber(int port)
          Set the port number of EspressManager.
static void setServletContext(java.lang.String context)
          set servlet context
static void setServletHttpHeader(java.lang.String headerName, java.lang.String headerValue)
          Static method to set extra HTTP header that is sent with every request to ESMMessageServlet.
static void setServletRunner(java.lang.String comm_url)
          Set servlet runner hostname and port number.
 void setSkipMultiDataSourceStep(boolean b)
          Specify whether the multiple data source option step should be skipped in the report wizard.
 void setSkipPredefinedTemplatesStep(boolean b)
          Specify whether the select predefined templates step should be skipped in the report wizard.
 void setSkipQueryResultStep(boolean b)
          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 setTemplatesDirectory(java.lang.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/'.
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 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.
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 useSysResourceImages()
          Gets whether to use images in JAR files (ReportDesigner.jar) or other resource that can be loaded by ClassLoader.getSystemResource(imagesPath).
 void writeFile(java.lang.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 Detail

SAVE_RPT_BEFORE_DRILLDOWN

public static final int SAVE_RPT_BEFORE_DRILLDOWN
save report before inserting a drilldown report

See Also:
Constant Field Values

SAVE_RPT_BEFORE_SUBREPORT

public static final int SAVE_RPT_BEFORE_SUBREPORT
save report before inserting a sub-report

See Also:
Constant Field Values

SAVE_RPT_BEFORE_PAGEVIEWER

public static final int SAVE_RPT_BEFORE_PAGEVIEWER
save report before launching pageviewer

See Also:
Constant Field Values
Constructor Detail

QbReportDesigner

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


QbReportDesigner

public QbReportDesigner(java.lang.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(java.lang.Object parent,
                        java.lang.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(java.lang.Object parent,
                        java.lang.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(java.lang.Object parent,
                        java.lang.String rptFile,
                        int displayRow,
                        java.lang.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(java.lang.Object parent,
                        java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.Object parent,
                        quadbase.common.util.internal.DBInfoBasic dbInfo,
                        quadbase.common.paramquery.QueryInParamSet inSet,
                        boolean newReport,
                        int displayRow,
                        java.lang.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(java.lang.Object parent,
                        java.lang.String classFile,
                        quadbase.common.paramquery.QueryInParamSet inSet,
                        boolean newReport,
                        int displayRow,
                        java.lang.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(java.lang.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(java.lang.Object parent,
                        java.lang.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(java.lang.Object parent,
                        java.lang.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(java.lang.Object parent,
                        java.lang.String dataRegistry,
                        boolean newReport,
                        int displayRow,
                        java.lang.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(java.lang.Object parent,
                        java.lang.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 Detail

setDataRegistry

public void setDataRegistry(java.lang.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(javax.swing.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 javax.swing.LookAndFeel getLookAndFeel()

setDebugMode

public static void setDebugMode(java.lang.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 javax.swing.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(java.lang.String userName,
                  java.lang.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(java.lang.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,
                                 java.lang.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 javax.swing.JMenuBar getReportMenuBar()
Returns a handle to the Menu Bar of the report.


getDesignerToolBar

public javax.swing.JToolBar getDesignerToolBar()
Returns the primary design tool bar


getDesignerToolBar2

public javax.swing.JToolBar getDesignerToolBar2()
Returns the secondary design tool bar


getPreviewToolBar

public javax.swing.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(java.lang.String fileLocation)
Saves the report at fileLocation.


writeFile

public void writeFile(java.lang.String filename,
                      byte[] content)
               throws java.lang.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:
java.lang.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(java.lang.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 java.lang.Exception
Attempt to exit the program.

Throws:
java.lang.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(java.lang.String[] names)
Internal use only. Specify a preset list of parameters to be used when defining parameters in a query.


getDefaultParamNames

public java.lang.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(java.lang.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 java.lang.String getSecurityLevel()
Returns the security level name used to open this Report Designer.


setTemplatesDirectory

@Deprecated
public void setTemplatesDirectory(java.lang.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 java.lang.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(java.lang.String address)
                             throws java.net.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:
java.net.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(java.util.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(java.lang.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(java.lang.String context)
set servlet context


getServletContext

public static java.lang.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 javax.swing.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(java.lang.String path)
Sets the reports path relative to ERES


loadFile

public void loadFile(java.lang.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(java.lang.String reportFileName,
                     boolean repaint)

setBrowseRootDirectory

public static void setBrowseRootDirectory(java.lang.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(java.lang.String headerName,
                                        java.lang.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

EspressReport 6.6