com.crystaldecisions.ReportViewer
Class ReportViewerBean

java.lang.Object
  extended by ReportViewer
      extended by com.crystaldecisions.ReportViewer.ReportViewerBean
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class ReportViewerBean
extends ReportViewer
implements java.io.Externalizable

A Java Bean and extension of javax.swing.JApplet for viewing Crystal reports.

Being an applet, it is important that the report viewer's init and start methods are called soon after it is created (or de-serialized). When the report viewer is no longer needed, calling the stop and destroy methods will free up resources.

Almost all of the bean properties are bound. In other words, a PropertyChangeListener can be registered with the bean and it will be notified of all changes to the values of all properties. Some of the bean properties are also constrained. A VetoableChangeListener can be registered that can veto attempts to change those property values.

In addition to these property notifications, there are two bean events. A ViewChangeEvent is fired whenever a view in the report viewer is opened, activated, or closed. A HyperlinkEvent is fired when the user clicks on a hyperlink in the report.

Many of the bean methods start what may be a lengthy operation, and they return to the caller before that operation is complete. If it is important to know when the command begun by one of these methods is finished, the calling code should watch for the associated events or property change notifications.

Generally there will be a time delay between the method call returning and the associated event being fired or the property changing. In fact, there may be delay in beginning the command if the report viewer is busy processing a previous command. Commands are begun strictly one at a time in the order they are generated although, once begun, they may be processed in parallel in different threads.

The events and property change notifications will be given to the calling code on a different thread from the one that made the method call.

Author:
Ron Hayter

Field Summary
static int toCrystalReport
          Specifies exporting to Crystal Reports format.
static int toCSV
          Specifies exporting to Comma-Separated Values format.
static int toMSExcel
          Deprecated. Replaced by toMSExcelFormattedData.
static int toMSExcelDataOnly
          Specifies exporting data columns to Microsoft Excel format.
static int toMSExcelFormattedData
          Specifies exporting to Microsoft Excel format.
static int toMSWord
          Specifies exporting to Microsoft Word format.
static int toMSWordEditable
          Specifies exporting to Microsoft Word format.
static int toPDF
          Specifies exporting to Portable Document Format.
static int toRTF
          Specifies exporting to Rich Text Format.
static int zoomToPageWidth
          Specifies showing the entire width of the report page (but not necessarily the length) within the view.
static int zoomToWholePage
          Specifies showing the entire report page within the view.
 
Constructor Summary
ReportViewerBean()
          Constructs a ReportViewerBean object.
 
Method Summary
 void addHyperlinkListener(HyperlinkListener listener)
          Adds a listener for hyperlink clicks.
 void addServerRequestListener(ServerRequestListener listener)
          For internal use only.
 void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Adds a listener for the viewer's constrained properties.
 void addViewChangeListener(ViewChangeListener listener)
          Adds a listener for view changes.
 void busyChanged(boolean busy_)
          For internal use only.
 void canCloseCurrentViewChanged(boolean canCloseCurrentView_)
          For internal use only.
 void closeCurrentView()
          If the canCloseCurrentView property is true, closes the current view.
 void currentPageNumberChanged(int curPageN_)
          For internal use only.
 void currentViewNameChanged(java.lang.String currentViewName_)
          For internal use only.
 void destroy()
           
 void exportView(int exportFormat, java.io.File destinationFile)
          If the exportingPossible property is true, writes the report to the local disk in the indicated format.
 void exportView(int exportFormat, int startPageN, int endPageN, java.io.File destinationFile)
          If the exportingPossible property is true, writes a range of pages from the report to the local disk in the indicated format.
 boolean getBusy()
          Returns whether the report viewer is performing a command or is idle.
 boolean getCanCloseCurrentView()
          Returns whether the current report view can be closed.
 boolean getCanDrillDown()
          Returns whether the user is allowed to open drill-down views on groups and subreports.
 java.lang.String getCurrentMessage()
          Returns the most recent message displayed by the viewer.
 int getCurrentPageNumber()
          Returns the page number from page panel of the current view.
 java.lang.String getCurrentTip()
          Returns the most recent tooltip displayed by the viewer.
 java.lang.String getCurrentViewName()
          Returns the name of the current report view.
 java.applet.AppletContext getDefaultAppletContext()
          For internal use only.
 java.net.URL getDefaultCodeBase()
          For internal use only.
 java.net.URL getDefaultDocumentBase()
          For internal use only.
 boolean getEnableHyperlink()
          Returns whether the cursor changes shape over hyperlinks in the report.
 boolean getEnableInteractiveSort()
          Returns whether interactive sort controls are allowed in the report.
 boolean getExportingPossible()
          Returns whether the report viewer has permission from the Security Manager to write to the local disk.
 boolean getHasBusyIndicator()
          Returns whether the report viewer's toolbar has a busy indicator.
 boolean getHasExportButton()
          Returns whether the report viewer's toolbar has an Export button.
 boolean getHasGroupTree()
          Returns whether views on the current report have a group tree pane.
 boolean getHasPrintButton()
          Returns whether the report viewer's toolbar has a Print button.
 boolean getHasRefreshButton()
          Returns whether the report viewer's toolbar has a Refresh button.
 boolean getHasStatusBar()
          Deprecated. The viewer no longer has a status bar.
 boolean getHasStopButton()
          Returns whether the report viewer's toolbar has a Stop button.
 boolean getHasTextSearchControls()
          Returns whether the report viewer's toolbar has a Find button.
 boolean getHasToolBar()
          Returns whether the report viewer's toolbar is visible.
 boolean getHasZoomControl()
          Returns whether the report viewer's toolbar has a zoom (magnification) control.
 boolean getInteractive()
          Returns whether the report viewer will display interactive dialogs.
 java.lang.String getLanguage()
          Deprecated. Replaced by getLocale.
 int getLastPageNumber()
          Returns the highest-known page number from page panel of the current view.
 boolean getLastPageNumberKnown()
          Returns whether the last page number from the page panel of the current view is known.
 boolean getPrintingPossible()
          Returns whether the report viewer has permission from the Security Manager to print.
 boolean getPromptOnRefresh()
          For internal use only.
 java.lang.String getReportName()
          For internal use only.
 java.lang.String getReportParameter()
          For internal use only.
 java.lang.Object getReportSource()
          Returns the current IReportSource used by the report viewer.
 java.lang.String getReportTitle()
          For internal use only.
 java.lang.String getSearchText()
          Returns the most recent search text.
 java.lang.String getSelectionFormula()
          For internal use only.
 boolean getShowControlTooltips()
          Returns whether the report viewer's toolbar shows tooltips when the mouse hovers over controls.
 boolean getShowCrystalLogo()
          Deprecated. Replaced by getShowLogo.
 boolean getShowGroupTree()
          Returns whether the current view's group tree pane is expanded or collapsed.
 boolean getShowLogo()
          Returns whether the Business Objects logo is shown in the report viewer's toolbar.
 boolean getShowReportTooltips()
          Returns whether the report viewer shows tooltips when the mouse hovers over report objects in the page pane.
 void groupWidthChanged(boolean showGroupTree_)
          For internal use only.
 void hyperlinkClicked(java.net.URL url)
          For internal use only.
 boolean isBusy()
          Returns whether the report viewer is performing a command or is idle.
 boolean isExportingPossible()
          Returns whether the report viewer has permission from the Security Manager to write to the local disk.
 boolean isInteractive()
          Returns whether the report viewer will display interactive dialogs.
 boolean isLastPageNumberKnown()
          Returns whether the last page number from the page panel of the current view is known.
 boolean isPrintingPossible()
          Returns whether the report viewer has permission from the Security Manager to print.
 void lastPageNumberChanged(int lastPageN_)
          For internal use only.
 void lastPageNumberKnownChanged(boolean lastPageNKnown_)
          For internal use only.
 void printView()
          If the printingPossible property is true, prints all pages in the current view.
 void readExternal(java.io.ObjectInput input)
          Reads the state of the report viewer from the given input object.
 void refreshReport()
          Closes all views except the initial one (the "Main Report" view), discards all information cached for the report, refreshes data, and re-requests the current page of the report.
 void refreshReport(boolean refreshData)
          Closes all views except the initial one (the "Main Report" view), discards all cached pages, and re-requests the current page of the report.
 void removeHyperlinkListener(HyperlinkListener listener)
          Removes a listener for hyperlink clicks.
 void removeServerRequestListener(ServerRequestListener listener)
          For internal use only.
 void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Removes a listener for the viewer's constrained properties.
 void removeViewChangeListener(ViewChangeListener listener)
          Removes a listener for view changes.
 void requestEnded(int requestID, java.net.URL serverURL, java.lang.String parameters, boolean cancelled, java.lang.Exception exception, java.lang.String errorMessage)
          For internal use only.
 void requestStarted(int requestID, java.net.URL serverURL, java.lang.String parameters)
          For internal use only.
 void searchForText(java.lang.String searchString)
          Displays the next occurrence of the given text in the report output.
 void searchForText(java.lang.String searchString, boolean forwardSearch, boolean caseSensitive)
          Deprecated.  
 void searchTextChanged(java.lang.String searchText_)
          For internal use only.
 void setCanDrillDown(boolean canDrillDown_)
          Sets whether the user is allowed to open drill-down views on groups and subreports.
 void setEnableHyperlink(boolean enableHyperlink_)
          Sets whether the cursor should change shape over hyperlinks in the report.
 void setEnableInteractiveSort(boolean enableInteractiveSort_)
          Sets whether interactive sort controls are allowed in the report.
 void setHasBusyIndicator(boolean hasBusyIndicator_)
          Adds or removes the busy indicator on the report viewer's toolbar.
 void setHasExportButton(boolean hasExportButton_)
          Adds or removes an Export button on the report viewer's toolbar.
 void setHasGroupTree(boolean hasGroupTree_)
          Adds or removes group tree panes in views on the current report.
 void setHasPrintButton(boolean hasPrintButton_)
          Adds or removes a Print button on the report viewer's toolbar.
 void setHasRefreshButton(boolean hasRefreshButton_)
          Adds or removes a Refresh button on the report viewer's toolbar.
 void setHasStatusBar(boolean hasStatusBar_)
          Deprecated. The viewer no longer has a status bar.
 void setHasStopButton(boolean hasStopButton_)
          Adds or removes a Stop button on the report viewer's toolbar.
 void setHasTextSearchControls(boolean hasTextSearchControls_)
          Adds or removes a Find button on the report viewer's toolbar.
 void setHasToolBar(boolean hasToolBar_)
          Shows or hides the report viewer's toolbar.
 void setHasZoomControl(boolean hasZoomControl_)
          Adds or removes a zoom (magnification) control on the report viewer's toolbar.
 void setInteractive(boolean interactive_)
          Enables or disables the display of dialogs.
 void setLanguage(java.lang.String localeString_)
          Deprecated. Replaced by setLocale.
 void setPromptOnRefresh(boolean promptOnRefresh_)
          For internal use only.
 void setReportName(java.lang.String reportName_)
          For internal use only.
 void setReportParameter(java.lang.String reportParameter_)
          For internal use only.
 void setReportSource(java.lang.Object reportSource_)
          Sets the IReportSource to be used by the report viewer.
 void setReportTitle(java.lang.String reportTitle_)
          For internal use only.
 void setSelectionFormula(java.lang.String selectionFormula_)
          For internal use only.
 void setShowControlTooltips(boolean showControlTooltips_)
          Enables or disables the display of tooltips when the mouse hovers over controls in the report viewer's toolbar.
 void setShowCrystalLogo(boolean showLogo_)
          Deprecated. Replaced by setShowLogo.
 void setShowGroupTree(boolean showGroupTree_)
          Expands or collapses the group tree pane in the current view.
 void setShowLogo(boolean showLogo_)
          Hides or shows the Business Objects logo in the report viewer's toolbar.
 void setShowReportTooltips(boolean showReportTooltips_)
          Enables or disables the display of tooltips when the mouse hovers over report objects in the page pane.
 void setZoomFactor(int zoomFactor_)
          Sets the zoom (magnification) factor for the page pane in the current view.
 void showLastPage()
          Shows the last page of the report.
 void showPage(int pageN)
          Shows the indicated page.
 void showTip(java.lang.String currentTip_)
          For internal use only.
 void stopAllCommands()
          Cancels all unfinished commands.
 void viewActivated(java.lang.String viewName)
          For internal use only.
 void viewClosed(java.lang.String viewName)
          For internal use only.
 void viewOpened(java.lang.String viewName)
          For internal use only.
 void writeExternal(java.io.ObjectOutput output)
          Writes the state of the report viewer to the given output object.
 void zoomFactorChanged(int zoomFactor_)
          For internal use only.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

zoomToWholePage

public static final int zoomToWholePage
Specifies showing the entire report page within the view. If the view is resized, so will the report page.


zoomToPageWidth

public static final int zoomToPageWidth
Specifies showing the entire width of the report page (but not necessarily the length) within the view. If the view is resized, so will the report page.


toCrystalReport

public static final int toCrystalReport
Specifies exporting to Crystal Reports format. It is not possible to export a range of pages in this format.


toMSWord

public static final int toMSWord
Specifies exporting to Microsoft Word format.


toMSExcelFormattedData

public static final int toMSExcelFormattedData
Specifies exporting to Microsoft Excel format.


toRTF

public static final int toRTF
Specifies exporting to Rich Text Format.


toPDF

public static final int toPDF
Specifies exporting to Portable Document Format.


toMSExcelDataOnly

public static final int toMSExcelDataOnly
Specifies exporting data columns to Microsoft Excel format. It is not possible to export a range of pages in this format.


toMSWordEditable

public static final int toMSWordEditable
Specifies exporting to Microsoft Word format.


toCSV

public static final int toCSV
Specifies exporting to Comma-Separated Values format.


toMSExcel

public static final int toMSExcel
Deprecated. Replaced by toMSExcelFormattedData.
See Also:
toMSExcelFormattedData
Constructor Detail

ReportViewerBean

public ReportViewerBean()
Constructs a ReportViewerBean object.

Method Detail

getDefaultCodeBase

public java.net.URL getDefaultCodeBase()
For internal use only.

Returns:
null

getDefaultDocumentBase

public java.net.URL getDefaultDocumentBase()
For internal use only.

Returns:
null

getDefaultAppletContext

public java.applet.AppletContext getDefaultAppletContext()
For internal use only.

Returns:
null

destroy

public void destroy()

writeExternal

public void writeExternal(java.io.ObjectOutput output)
                   throws java.io.IOException
Writes the state of the report viewer to the given output object.

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
output - The stream to write the viewer state to.
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput input)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Reads the state of the report viewer from the given input object.

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
input - The stream to read the viewer state from.
Throws:
java.io.IOException - If an I/O error occurs.
java.lang.ClassNotFoundException - If the class for an object being restored cannot be found.

addVetoableChangeListener

public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a listener for the viewer's constrained properties. The listener can veto any changes to those properties.

Parameters:
listener -

removeVetoableChangeListener

public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes a listener for the viewer's constrained properties.

Parameters:
listener -

isInteractive

public boolean isInteractive()
Returns whether the report viewer will display interactive dialogs.

Returns:
True if the dialogs will be displayed when necessary.

getInteractive

public boolean getInteractive()
Returns whether the report viewer will display interactive dialogs.

This method is a synonym for isInteractive.

Returns:
True if the dialogs will be displayed when necessary.

setInteractive

public void setInteractive(boolean interactive_)
Enables or disables the display of dialogs.

Parameters:
interactive_ - True if the report viewer can display interactive dialogs.

getReportSource

public java.lang.Object getReportSource()
Returns the current IReportSource used by the report viewer.

Returns:
An IReportSource or null.

setReportSource

public void setReportSource(java.lang.Object reportSource_)
Sets the IReportSource to be used by the report viewer.

Parameters:
reportSource_ - An IReportSource or null.

getReportName

public java.lang.String getReportName()
For internal use only.

Returns:
String

setReportName

public void setReportName(java.lang.String reportName_)
For internal use only.

Parameters:
reportName_ -

getReportTitle

public java.lang.String getReportTitle()
For internal use only.

Returns:
String

setReportTitle

public void setReportTitle(java.lang.String reportTitle_)
For internal use only.

Parameters:
reportTitle_ -

getReportParameter

public java.lang.String getReportParameter()
For internal use only.

Returns:
String

setReportParameter

public void setReportParameter(java.lang.String reportParameter_)
For internal use only.

Parameters:
reportParameter_ -

getLanguage

public java.lang.String getLanguage()
Deprecated. Replaced by getLocale.

Returns:
String

setLanguage

public void setLanguage(java.lang.String localeString_)
Deprecated. Replaced by setLocale.

Parameters:
localeString_ -

getHasToolBar

public boolean getHasToolBar()
Returns whether the report viewer's toolbar is visible.

Returns:
True if the toolbar is visible.

setHasToolBar

public void setHasToolBar(boolean hasToolBar_)
Shows or hides the report viewer's toolbar.

Parameters:
hasToolBar_ - True if the toolbar is to be made visible.

isPrintingPossible

public boolean isPrintingPossible()
Returns whether the report viewer has permission from the Security Manager to print.

Returns:
True if printing is allowed.

getPrintingPossible

public boolean getPrintingPossible()
Returns whether the report viewer has permission from the Security Manager to print.

This method is a synonym for isPrintingPossible.

Returns:
True if printing is allowed.

getHasPrintButton

public boolean getHasPrintButton()
Returns whether the report viewer's toolbar has a Print button.

Returns:
True if the toolbar has a Print button.

setHasPrintButton

public void setHasPrintButton(boolean hasPrintButton_)
                       throws java.beans.PropertyVetoException
Adds or removes a Print button on the report viewer's toolbar. The toolbar can only have a Print button if the bean's printingPossible property is true; otherwise, an attempt to add a Print button will be vetoed.

Parameters:
hasPrintButton_ - True if the toolbar should have a Print button.
Throws:
java.beans.PropertyVetoException

isExportingPossible

public boolean isExportingPossible()
Returns whether the report viewer has permission from the Security Manager to write to the local disk.

Returns:
True if writing to disk is allowed.

getExportingPossible

public boolean getExportingPossible()
Returns whether the report viewer has permission from the Security Manager to write to the local disk.

This method is a synonym for isExportingPossible.

Returns:
True if writing to disk is allowed.

getHasExportButton

public boolean getHasExportButton()
Returns whether the report viewer's toolbar has an Export button.

Returns:
True if the toolbar has an Export button.

setHasExportButton

public void setHasExportButton(boolean hasExportButton_)
                        throws java.beans.PropertyVetoException
Adds or removes an Export button on the report viewer's toolbar. The toolbar can only have an Export button if the bean's exportingPossible property is true; otherwise, an attempt to add an Export button will be vetoed.

Parameters:
hasExportButton_ - True if the toolbar should have an Export button.
Throws:
java.beans.PropertyVetoException

getHasStopButton

public boolean getHasStopButton()
Returns whether the report viewer's toolbar has a Stop button.

Returns:
True if the toolbar has a Stop button.

setHasStopButton

public void setHasStopButton(boolean hasStopButton_)
Adds or removes a Stop button on the report viewer's toolbar.

Parameters:
hasStopButton_ - True if the toolbar should have a Stop button.

getHasRefreshButton

public boolean getHasRefreshButton()
Returns whether the report viewer's toolbar has a Refresh button.

Returns:
True if the toolbar has a Refresh button.

setHasRefreshButton

public void setHasRefreshButton(boolean hasRefreshButton_)
Adds or removes a Refresh button on the report viewer's toolbar.

Parameters:
hasRefreshButton_ - True if the toolbar should have a Refresh button.

getHasGroupTree

public boolean getHasGroupTree()
Returns whether views on the current report have a group tree pane.

Returns:
True if views have group tree panes.

setHasGroupTree

public void setHasGroupTree(boolean hasGroupTree_)
                     throws java.beans.PropertyVetoException
Adds or removes group tree panes in views on the current report. This method also adds or removes a Show Group Tree button on the report viewer's toolbar. Views can only have a group tree pane if the report allows it; otherwise, an attempt to add group tree panes will be vetoed.

Parameters:
hasGroupTree_ - True if views should have a group tree pane.
Throws:
java.beans.PropertyVetoException

getShowGroupTree

public boolean getShowGroupTree()
Returns whether the current view's group tree pane is expanded or collapsed.

Returns:
True if there is a group tree pane in the current view and it is expanded.

setShowGroupTree

public void setShowGroupTree(boolean showGroupTree_)
                      throws java.beans.PropertyVetoException
Expands or collapses the group tree pane in the current view. If the current view has no group tree pane, this change will be vetoed.

Parameters:
showGroupTree_ - True if the group tree pane should be expanded.
Throws:
java.beans.PropertyVetoException

groupWidthChanged

public void groupWidthChanged(boolean showGroupTree_)
For internal use only.

Parameters:
showGroupTree_ -

getHasZoomControl

public boolean getHasZoomControl()
Returns whether the report viewer's toolbar has a zoom (magnification) control.

Returns:
True if the toolbar has a zoom control.

setHasZoomControl

public void setHasZoomControl(boolean hasZoomControl_)
Adds or removes a zoom (magnification) control on the report viewer's toolbar.

Parameters:
hasZoomControl_ - True if the toolbar should have a zoom control.

setZoomFactor

public void setZoomFactor(int zoomFactor_)
                   throws java.beans.PropertyVetoException
Sets the zoom (magnification) factor for the page pane in the current view. The zoom factor must be between 25% and 400%, inclusive, or zoomToWholePage or zoomToPageWidth.

Parameters:
zoomFactor_ - A value between 25 and 400, or zoomToWholePage or zoomToPageWidth.
Throws:
java.beans.PropertyVetoException

zoomFactorChanged

public void zoomFactorChanged(int zoomFactor_)
For internal use only.

Parameters:
zoomFactor_ -

getHasTextSearchControls

public boolean getHasTextSearchControls()
Returns whether the report viewer's toolbar has a Find button.

Returns:
True if the toolbar has a Find button.

setHasTextSearchControls

public void setHasTextSearchControls(boolean hasTextSearchControls_)
Adds or removes a Find button on the report viewer's toolbar.

Parameters:
hasTextSearchControls_ - True if the toolbar should have a Find button.

getHasBusyIndicator

public boolean getHasBusyIndicator()
Returns whether the report viewer's toolbar has a busy indicator.

Returns:
True if the toolbar has a busy indicator.

setHasBusyIndicator

public void setHasBusyIndicator(boolean hasBusyIndicator_)
Adds or removes the busy indicator on the report viewer's toolbar.

Parameters:
hasBusyIndicator_ - True if the toolbar should have a busy indicator.

getCanDrillDown

public boolean getCanDrillDown()
Returns whether the user is allowed to open drill-down views on groups and subreports.

Returns:
True if drill-down views are allowed.

setCanDrillDown

public void setCanDrillDown(boolean canDrillDown_)
Sets whether the user is allowed to open drill-down views on groups and subreports.

Parameters:
canDrillDown_ - True if drill-down views are to be allowed.

getCurrentPageNumber

public int getCurrentPageNumber()
Returns the page number from page panel of the current view.

Returns:
The current page number.

currentPageNumberChanged

public void currentPageNumberChanged(int curPageN_)
For internal use only.

Parameters:
curPageN_ -

getLastPageNumber

public int getLastPageNumber()
Returns the highest-known page number from page panel of the current view. If the last page of the report has not yet been viewed, the last page number might not be known.

Returns:
The last page number, if known.
See Also:
isLastPageNumberKnown()

lastPageNumberChanged

public void lastPageNumberChanged(int lastPageN_)
For internal use only.

Parameters:
lastPageN_ -

isLastPageNumberKnown

public boolean isLastPageNumberKnown()
Returns whether the last page number from the page panel of the current view is known. It might not be known if the last page of the report has not yet been viewed.

Returns:
True if the last page number is known.

getLastPageNumberKnown

public boolean getLastPageNumberKnown()
Returns whether the last page number from the page panel of the current view is known. It might not be known if the last page of the report has not yet been viewed.

This method is a synonym for isLastPageNumberKnown.

Returns:
True if the last page number is known.

lastPageNumberKnownChanged

public void lastPageNumberKnownChanged(boolean lastPageNKnown_)
For internal use only.

Parameters:
lastPageNKnown_ -

getCurrentViewName

public java.lang.String getCurrentViewName()
Returns the name of the current report view.

Returns:
The name of the current view.
See Also:
ViewChangeListener

currentViewNameChanged

public void currentViewNameChanged(java.lang.String currentViewName_)
For internal use only.

Parameters:
currentViewName_ -

getCanCloseCurrentView

public boolean getCanCloseCurrentView()
Returns whether the current report view can be closed.

Returns:
True if the view can be closed.
See Also:
closeCurrentView()

canCloseCurrentViewChanged

public void canCloseCurrentViewChanged(boolean canCloseCurrentView_)
For internal use only.

Parameters:
canCloseCurrentView_ -

isBusy

public boolean isBusy()
Returns whether the report viewer is performing a command or is idle. Commands can be initiated by the user (for instance, by clicking on a toolbar button) or by programmatically changing a bean property or calling a bean method.

Returns:
True if the viewer is performing a command.

getBusy

public boolean getBusy()
Returns whether the report viewer is performing a command or is idle. Commands can be initiated by the user (for instance, by clicking on a toolbar button) or by programmatically changing a bean property or calling a bean method.

This method is a synonym for isBusy.

Returns:
True if the viewer is performing a command.

busyChanged

public void busyChanged(boolean busy_)
For internal use only.

Parameters:
busy_ -

getSearchText

public java.lang.String getSearchText()
Returns the most recent search text.

Returns:
The last text searched for.
See Also:
searchForText(String)

searchTextChanged

public void searchTextChanged(java.lang.String searchText_)
For internal use only.

Parameters:
searchText_ -

getSelectionFormula

public java.lang.String getSelectionFormula()
For internal use only.

Returns:
String

setSelectionFormula

public void setSelectionFormula(java.lang.String selectionFormula_)
For internal use only.

Parameters:
selectionFormula_ -

getPromptOnRefresh

public boolean getPromptOnRefresh()
For internal use only.

Returns:
boolean

setPromptOnRefresh

public void setPromptOnRefresh(boolean promptOnRefresh_)
For internal use only.

Parameters:
promptOnRefresh_ -

getHasStatusBar

public boolean getHasStatusBar()
Deprecated. The viewer no longer has a status bar.

Returns:
True if there is a status bar at the bottom edge of the viewer.

setHasStatusBar

public void setHasStatusBar(boolean hasStatusBar_)
Deprecated. The viewer no longer has a status bar.

Parameters:
hasStatusBar_ - True if there should be a status bar at the bottom edge of the viewer.

getCurrentMessage

public java.lang.String getCurrentMessage()
Returns the most recent message displayed by the viewer. This message might be an error, a warning, or some other informational message.

Returns:
The last message shown to the user.

getCurrentTip

public java.lang.String getCurrentTip()
Returns the most recent tooltip displayed by the viewer.

Returns:
The last tooltip shown to the user.
See Also:
getShowControlTooltips(), getShowReportTooltips()

showTip

public void showTip(java.lang.String currentTip_)
For internal use only.

Parameters:
currentTip_ -

getEnableHyperlink

public boolean getEnableHyperlink()
Returns whether the cursor changes shape over hyperlinks in the report.

Returns:
True if the cursor shows that hyperlinks are active.

setEnableHyperlink

public void setEnableHyperlink(boolean enableHyperlink_)
Sets whether the cursor should change shape over hyperlinks in the report. This method also enables and disables the firing of HyperlinkEvents.

Parameters:
enableHyperlink_ - True if the cursor should show that hyperlinks are active.
See Also:
HyperlinkListener

getEnableInteractiveSort

public boolean getEnableInteractiveSort()
Returns whether interactive sort controls are allowed in the report.

Returns:
True if interactive sort controls are allowed.

setEnableInteractiveSort

public void setEnableInteractiveSort(boolean enableInteractiveSort_)
Sets whether interactive sort controls are allowed in the report.

Parameters:
enableInteractiveSort_ - True if interactive sort controls are allowed.

getShowControlTooltips

public boolean getShowControlTooltips()
Returns whether the report viewer's toolbar shows tooltips when the mouse hovers over controls.

Returns:
True if the toolbar shows tooltips.

setShowControlTooltips

public void setShowControlTooltips(boolean showControlTooltips_)
Enables or disables the display of tooltips when the mouse hovers over controls in the report viewer's toolbar.

Parameters:
showControlTooltips_ - True if tooltips are to be enabled.

getShowReportTooltips

public boolean getShowReportTooltips()
Returns whether the report viewer shows tooltips when the mouse hovers over report objects in the page pane.

Returns:
True if the viewer shows report object tooltips.

setShowReportTooltips

public void setShowReportTooltips(boolean showReportTooltips_)
Enables or disables the display of tooltips when the mouse hovers over report objects in the page pane.

Parameters:
showReportTooltips_ - True if tooltips are to be enabled.

getShowLogo

public boolean getShowLogo()
Returns whether the Business Objects logo is shown in the report viewer's toolbar.

Returns:
True if the toolbar shows the logo.

setShowLogo

public void setShowLogo(boolean showLogo_)
Hides or shows the Business Objects logo in the report viewer's toolbar.

Parameters:
showLogo_ - True if the logo is to be made visible.

getShowCrystalLogo

public boolean getShowCrystalLogo()
Deprecated. Replaced by getShowLogo.

Returns:
boolean
See Also:
getShowLogo()

setShowCrystalLogo

public void setShowCrystalLogo(boolean showLogo_)
Deprecated. Replaced by setShowLogo.

Parameters:
showLogo_ -
See Also:
setShowLogo(boolean)

addViewChangeListener

public void addViewChangeListener(ViewChangeListener listener)
Adds a listener for view changes.

Parameters:
listener -
See Also:
ViewChangeEvent, ViewChangeListener, ViewChangeAdapter

removeViewChangeListener

public void removeViewChangeListener(ViewChangeListener listener)
Removes a listener for view changes.

Parameters:
listener -

viewOpened

public void viewOpened(java.lang.String viewName)
For internal use only.

Parameters:
viewName -

viewActivated

public void viewActivated(java.lang.String viewName)
For internal use only.

Parameters:
viewName -

viewClosed

public void viewClosed(java.lang.String viewName)
For internal use only.

Parameters:
viewName -

addServerRequestListener

public void addServerRequestListener(ServerRequestListener listener)
For internal use only.

Parameters:
listener -

removeServerRequestListener

public void removeServerRequestListener(ServerRequestListener listener)
For internal use only.

Parameters:
listener -

requestStarted

public void requestStarted(int requestID,
                           java.net.URL serverURL,
                           java.lang.String parameters)
For internal use only.

Parameters:
requestID -
serverURL -
parameters -

requestEnded

public void requestEnded(int requestID,
                         java.net.URL serverURL,
                         java.lang.String parameters,
                         boolean cancelled,
                         java.lang.Exception exception,
                         java.lang.String errorMessage)
For internal use only.

Parameters:
requestID -
serverURL -
parameters -
cancelled -
exception -
errorMessage -

addHyperlinkListener

public void addHyperlinkListener(HyperlinkListener listener)
Adds a listener for hyperlink clicks.

Parameters:
listener -
See Also:
setEnableHyperlink(boolean), HyperlinkEvent, HyperlinkListener

removeHyperlinkListener

public void removeHyperlinkListener(HyperlinkListener listener)
Removes a listener for hyperlink clicks.

Parameters:
listener -

hyperlinkClicked

public void hyperlinkClicked(java.net.URL url)
For internal use only.

Parameters:
url -

closeCurrentView

public void closeCurrentView()
If the canCloseCurrentView property is true, closes the current view. Equivalent to the close button on the view's tab. A viewClosed and a viewActivated event are fired. The currentViewName property is changed.

See Also:
getCanCloseCurrentView()

showPage

public void showPage(int pageN)
Shows the indicated page. Equivalent to the page number field in the toolbar. The currentPageNumber property is changed.

Parameters:
pageN - Which page to show.
See Also:
getCurrentPageNumber(), getLastPageNumber(), isLastPageNumberKnown()

showLastPage

public void showLastPage()
Shows the last page of the report. Equivalent to the Last Page button in the toolbar. The lastPageNumber and lastPageNumberKnown properties may be changed.

See Also:
getCurrentPageNumber(), getLastPageNumber(), isLastPageNumberKnown()

stopAllCommands

public void stopAllCommands()
Cancels all unfinished commands. Equivalent to the Stop button in the toolbar.


printView

public void printView()
If the printingPossible property is true, prints all pages in the current view. Equivalent to the Print button in the toolbar.

See Also:
isPrintingPossible()

exportView

public void exportView(int exportFormat,
                       java.io.File destinationFile)
If the exportingPossible property is true, writes the report to the local disk in the indicated format. Similar to the Export button in the toolbar.

Parameters:
exportFormat - Which format to export into.
destinationFile - Where to write the exported report.
See Also:
isExportingPossible()

exportView

public void exportView(int exportFormat,
                       int startPageN,
                       int endPageN,
                       java.io.File destinationFile)
If the exportingPossible property is true, writes a range of pages from the report to the local disk in the indicated format. Similar to the Export button in the toolbar.

Parameters:
exportFormat - Which format to export into.
startPageN - The first page to export.
endPageN - The last page to export, or 0 to export to the end of the report.
destinationFile - Where to write the exported report.
See Also:
isExportingPossible()

refreshReport

public void refreshReport()
Closes all views except the initial one (the "Main Report" view), discards all information cached for the report, refreshes data, and re-requests the current page of the report.


refreshReport

public void refreshReport(boolean refreshData)
Closes all views except the initial one (the "Main Report" view), discards all cached pages, and re-requests the current page of the report. Optionally, the data for the report is refreshed.

Parameters:
refreshData - Whether to also refresh the data.

searchForText

public void searchForText(java.lang.String searchString)
Displays the next occurrence of the given text in the report output. Equivalent to the Find button on the toolbar. The search is forward and case-insensitive. The searchText property is changed.

Parameters:
searchString - The text to find.
See Also:
getSearchText()

searchForText

public void searchForText(java.lang.String searchString,
                          boolean forwardSearch,
                          boolean caseSensitive)
Deprecated. 

Displays the next occurrence of the given text in the report output. Equivalent to the Find button on the toolbar. Currently, the second and third parameters are ignored; the search is always forward and case-insensitive. The searchText property is changed.

Parameters:
searchString - The text to find.
forwardSearch - Ignored.
caseSensitive - Ignored.
See Also:
searchForText(String)