com.crystaldecisions.report.web.viewer
Class CrystalReportInteractiveViewer

java.lang.Object
  |
  +--com.crystaldecisions.report.web.ServerControl
        |
        +--com.crystaldecisions.report.web.viewer.ReportServerControl
              |
              +--com.crystaldecisions.report.web.viewer.CrystalReportViewerBase
                    |
                    +--com.crystaldecisions.report.web.viewer.CrystalReportViewer
                          |
                          +--com.crystaldecisions.report.web.viewer.CrystalReportInteractiveViewer

public class CrystalReportInteractiveViewer
extends CrystalReportViewer

This class enables you to manipulate how the viewer is displayed. The CrystalReportInteractiveViewer class provides the same functionality as the CrystalReportViewer class, plus the functionality to do an Advanced Search on the current report. There are methods for setting various options concerning how the report is displayed, as well as configuring the Advanced Search Wizard.

See the Getting Started > Tutorials section of the Viewer Java SDK Guide for an example of how to use the CrystalReportInteractiveViewer class.


Field Summary
 
Fields inherited from class com.crystaldecisions.report.web.viewer.CrystalReportViewer
PAGE_TYPE, TOOLBAR_TYPE, TREE_TYPE
 
Fields inherited from class com.crystaldecisions.report.web.viewer.CrystalReportViewerBase
BACKWARD, FORWARD, NOACTION
 
Constructor Summary
CrystalReportInteractiveViewer()
           
 
Method Summary
 java.lang.String getAdvSearchFormula()
          Returns the search formula currently set for the Advanced Search Wizard.
 int getAdvSearchResultPageSize()
          Returns the number of results displayed on each page of the Advanced Search Wizard.
 java.lang.String[] getAdvSearchShowFields()
          Returns the data fields that are displayed in the Advanced Search result.
 BooleanSearchControl getBooleanSearchControl()
          Deprecated. As of Version 10.
 java.lang.String getPageLogo()
          Returns the name of the image file used to represent the logo in the top left corner of the viewer.
 java.lang.String getPageTitle()
          Returns the title displayed at the top of the viewer.
 boolean hasBooleanSearchButton()
          Returns whether the report has an Advanced Search button.
 boolean hasHeaderArea()
          Returns whether the viewer displays the header containing the logo and the page title.
 boolean hasHelpButton()
          Returns whether the viewer has a help button.
 boolean isEnableBooleanSearch()
          Returns whether the Advanced Search Wizard is enabled.
 boolean isRenderAsHTML32()
          Always returns false.
 boolean isShowAdvSearchConditionsTab()
          Returns whether the "Conditions" tab of the Advanced Search Wizard will be displayed.
 boolean isShowAdvSearchFieldsTab()
          Returns whether the "Fields" tab of the Advanced Search Wizard is displayed.
 void navigateTo(BooleanSearchNavigateEventObject e)
          For internal use only.
 void setAdvSearchFormula(java.lang.String formula)
          Sets the search formula for the Advanced Search Wizard.
 void setAdvSearchResultPageSize(int size)
          Sets the number of records to display per page for the Advanced Search Wizard result.
 void setAdvSearchShowFields(java.lang.String[] showFields)
          Sets the fields to show for the Advanced Search Wizard.
 void setBooleanSearchControl(BooleanSearchControl newBooleanSearchControl)
          Deprecated. As of Version 10.
 void setEnableBooleanSearch(boolean newEnableBooleanSearch)
          Sets whether the user can perform advanced searches in reports.
 void setHasBooleanSearchButton(boolean newHasBooleanSearchButton)
          Sets whether to display the Advanced Search Wizard button.
 void setHasHeaderArea(boolean newHasheaderArea)
          Sets whether the viewer displays the header containing the logo and the page title.
 void setHasHelpButton(boolean hasHelpButton)
          Sets whether to display the help button.
 void setPageLogo(java.lang.String newPageLogo)
          Sets the logo to use in the header area when rendering the report.
 void setPageTitle(java.lang.String newPageTitle)
          Sets the title to use in the header area when rendering the report.
 void setRenderAsHTML32(boolean newM_bRenderAsHTML32)
           This method is not used by the DHTML interactive viewer.
 void setShowAdvSearchConditionsTab(boolean showConditionsTab)
          Sets whether the "Conditions" tab of the Advanced Search Wizard will be displayed.
 void setShowAdvSearchFieldsTab(boolean showFieldsTab)
          Sets whether the "Fields" tab of the Advanced Search Wizard will be displayed.
 
Methods inherited from class com.crystaldecisions.report.web.viewer.CrystalReportViewer
addDrillDownSubreportEventListener, addNavigateEventListener, addToolbarCommandEventListener, drillDown, getGroupTreeWidth, getGroupTreeWidthUnit, getPageToTreeRatio, getPrintMode, getToolbar, getViewInfo, getZoomFactor, hasExportButton, hasGotoPageButton, hasLogo, hasPageBottomToolbar, hasPageNavigationButtons, hasPrintButton, hasRefreshButton, hasSearchButton, hasToggleGroupTreeButton, hasViewList, hasZoomFactorList, isBestFitPage, isDisplayGroupTree, isDisplayPage, isDisplayToolbar, isEnableDrillDown, isSeparatePages, isShowAllPageIds, removeDrillDownSubreportEventListener, removeNavigateEventListener, removeToolbarCommandEventListener, searchText, setBestFitPage, setDisplayGroupTree, setDisplayPage, setDisplayToolbar, setEnableDrillDown, setGroupTreeWidth, setGroupTreeWidthUnit, setHasExportButton, setHasGotoPageButton, setHasLogo, setHasPageBottomToolbar, setHasPageNavigationButtons, setHasPrintButton, setHasRefreshButton, setHasSearchButton, setHasToggleGroupTreeButton, setHasViewList, setHasZoomFactorList, setPageToTreeRatio, setPrintMode, setSeparatePages, setShowAllPageIds, setZoomFactor, showFirstPage, showLastPage, showNextPage, showNthPage, showPreviousPage
 
Methods inherited from class com.crystaldecisions.report.web.viewer.CrystalReportViewerBase
addAfterRenderContentEventListener, addAfterRenderEventListener, addAfterRenderObjectEventListener, addAfterRenderViewItemEventListener, addBeforeRenderContentEventListener, addBeforeRenderEventListener, addBeforeRenderObjectEventListener, addBeforeRenderViewItemEventListener, addDrillEventListener, addOnRenderScriptEventListener, addOnRenderStyleEventListener, getHyperlinkTarget, removeAfterRenderContentEventListener, removeAfterRenderEventListener, removeAfterRenderObjectEventListener, removeAfterRenderViewItemEventListener, removeBeforeRenderContentEventListener, removeBeforeRenderEventListener, removeBeforeRenderObjectEventListener, removeBeforeRenderViewItemEventListener, removeDrillEventListener, removeOnRenderScriptEventListener, removeOnRenderStyleEventListener, setHyperlinkTarget
 
Methods inherited from class com.crystaldecisions.report.web.viewer.ReportServerControl
addReportPartBookmarkNavigationEventListener, addReportSourceChangeEventListener, dispose, getDatabaseLogonInfos, getEnterpriseLogon, getParameterFields, getRenderingDPI, getReportSource, getReportSourceClassFactoryName, getSelectionFormula, getStyleSheetFileName, getViewTimeSelectionFormula, isEnableLogonPrompt, isEnableParameterPrompt, isReuseParameterValuesOnRefresh, navigateTo, refresh, removeReportPartBookmarkNavigationEventListener, removeReportPartBookmarkNavigationEventListenerr, removeReportSourceChangeEventListener, setDatabaseLogonInfos, setEnableLogonPrompt, setEnableParameterPrompt, setEnterpriseLogon, setParameterFields, setRenderingDPI, setReportSource, setReportSourceClassFactoryName, setReuseParameterValuesOnRefresh, setSelectionFormula, setStyleSheetFileName, setViewTimeSelectionFormula
 
Methods inherited from class com.crystaldecisions.report.web.ServerControl
getHeight, getHtmlContent, getLeft, getName, getProductLocale, getTop, getURI, getViewState, getWidth, isIgnoreViewStateOnLoad, isOwnForm, isOwnPage, processHttpRequest, setHeight, setIgnoreViewStateOnLoad, setLeft, setName, setOwnForm, setOwnPage, setProductLocale, setTop, setURI, setViewState, setWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrystalReportInteractiveViewer

public CrystalReportInteractiveViewer()
Method Detail

getBooleanSearchControl

public BooleanSearchControl getBooleanSearchControl()
Deprecated. As of Version 10.


getPageLogo

public java.lang.String getPageLogo()

Returns the name of the image file used to represent the logo in the top left corner of the viewer.

Returns:
The name of the image file used to represent the logo in the top left corner of the viewer as a String.
See Also:
setPageLogo

getPageTitle

public java.lang.String getPageTitle()

Returns the title displayed at the top of the viewer.

Returns:
The title displayed at the top of the viewer as a String.
See Also:
setPageTitle

hasBooleanSearchButton

public boolean hasBooleanSearchButton()

Returns whether the report has an Advanced Search button.

Returns:
true if the report has an Advanced Search button and false otherwise.
See Also:
setHasBooleanSearchButton

hasHeaderArea

public boolean hasHeaderArea()

Returns whether the viewer displays the header containing the logo and the page title.

Returns:
true if the viewer displays the header containing the logo and the page title and false otherwise.
See Also:
setHasHeaderArea

hasHelpButton

public boolean hasHelpButton()

Returns whether the viewer has a help button.

Returns:
true if the report has a help button and false otherwise.
See Also:
setHasHelpButton

isEnableBooleanSearch

public boolean isEnableBooleanSearch()

Returns whether the Advanced Search Wizard is enabled.

Returns:
true if the Advanced Search Wizard is enabled and false otherwise.
See Also:
setEnableBooleanSearch

isRenderAsHTML32

public boolean isRenderAsHTML32()

Always returns false. The CrystalReportInteractiveViewer object must always be rendered using HTML 4.0 tags. This method overrides the setRenderAsHTML32 method from the CrystalReportViewer class.

Overrides:
isRenderAsHTML32 in class CrystalReportViewer
Returns:
Always returns false.
See Also:
setRenderAsHTML32

navigateTo

public void navigateTo(BooleanSearchNavigateEventObject e)
For internal use only.


setBooleanSearchControl

public void setBooleanSearchControl(BooleanSearchControl newBooleanSearchControl)
Deprecated. As of Version 10.


setEnableBooleanSearch

public void setEnableBooleanSearch(boolean newEnableBooleanSearch)

Sets whether the user can perform advanced searches in reports. When this method is set to false, the show advanced search button is not displayed regardless of the value of the HasBooleanSearchButton method.

Parameters:
newEnableBooleanSearch - true to enable the Advanced Search Wizard.
See Also:
isEnableBooleanSearch

setHasBooleanSearchButton

public void setHasBooleanSearchButton(boolean newHasBooleanSearchButton)

Sets whether to display the Advanced Search Wizard button.

Parameters:
newHasBooleanSearchButton - true to display the Advanced Search Wizard button.
See Also:
hasBooleanSearchButton

setHasHeaderArea

public void setHasHeaderArea(boolean newHasheaderArea)

Sets whether the viewer displays the header containing the logo and the page title.

Parameters:
newHasheaderArea - true if the viewer displays the header containing the logo and the page title.
See Also:
hasHeaderArea

setHasHelpButton

public void setHasHelpButton(boolean hasHelpButton)

Sets whether to display the help button.

Parameters:
hasHelpButton - true to display the help button.
See Also:
hasHelpButton

setPageLogo

public void setPageLogo(java.lang.String newPageLogo)

Sets the logo to use in the header area when rendering the report. The logo can be any image file supported by your browser.

Note: The default value is "mlogo.gif". If you want to provide another logo, put it in the directory that corresponds to the CrystalReportViewers11/images/tool bar virtual directory.

When the PageLogo or PageTitle properties are set, the HasHeaderArea property is set to True. The header area displays unless the HasHeaderArea property is programmatically set to False.

Parameters:
newPageLogo - A String that specifies the name of the image file used to represent the logo in the top left corner of the viewer.
See Also:
getPageLogo

setPageTitle

public void setPageTitle(java.lang.String newPageTitle)

Sets the title to use in the header area when rendering the report.

Parameters:
newPageTitle - A String that specifies the title displayed in the header area.
See Also:
getPageTitle

setRenderAsHTML32

public void setRenderAsHTML32(boolean newM_bRenderAsHTML32)

This method is not used by the DHTML interactive viewer.

Overrides:
setRenderAsHTML32 in class CrystalReportViewer
Parameters:
newM_bRenderAsHTML32 - true to display the content as HTML 3.2.
See Also:
isRenderAsHTML32

getAdvSearchFormula

public java.lang.String getAdvSearchFormula()

Returns the search formula currently set for the Advanced Search Wizard. The search formula is the formula used by the Advanced Search Wizard to query the report and return results to the user.

Returns:
the search formula currently set for the Advanced Search Wizard as a String
See Also:
setAdvSearchFormula

getAdvSearchResultPageSize

public int getAdvSearchResultPageSize()

Returns the number of results displayed on each page of the Advanced Search Wizard.

Returns:
the number of results displayed on each page of the Advanced Search Wizard as an int
See Also:
setAdvSearchResultPageSize

getAdvSearchShowFields

public java.lang.String[] getAdvSearchShowFields()

Returns the data fields that are displayed in the Advanced Search result. These are the fields that appear in the resulting data set. As an example, assume that the following (hypothetical) fields exist in the report: Customer.Name, Customer.Address and Customer.Orders. If the AdvSearchShowFields property is set to show Customer.Name then, in the results of the Advanced Search, only the Customer Name data appears.

Returns:
a String array that specifies the fields that are displayed in the Advanced Search result

isShowAdvSearchFieldsTab

public boolean isShowAdvSearchFieldsTab()

Returns whether the "Fields" tab of the Advanced Search Wizard is displayed.

Returns:
true if the "Fields" tab is displayed; false if the "Fields" tab is hidden

isShowAdvSearchConditionsTab

public boolean isShowAdvSearchConditionsTab()

Returns whether the "Conditions" tab of the Advanced Search Wizard will be displayed.

When this method is set to false, the setAdvSearchFormula method must be set in order to display results.

Returns:
true if the "Conditions" tab is displayed; false if the "Conditions" tab is hidden

setShowAdvSearchFieldsTab

public void setShowAdvSearchFieldsTab(boolean showFieldsTab)

Sets whether the "Fields" tab of the Advanced Search Wizard will be displayed.

When this method is set to false, the setAdvSearchShowFields property must be set in order to display results.

Parameters:
showFieldsTab - true to display the "Fields" tab of the Advanced Search Wizard

setShowAdvSearchConditionsTab

public void setShowAdvSearchConditionsTab(boolean showConditionsTab)

Sets whether the "Conditions" tab of the Advanced Search Wizard will be displayed.

Parameters:
showConditionsTab - true to display the "Conditions" tab of the Advanced Search Wizard

setAdvSearchFormula

public void setAdvSearchFormula(java.lang.String formula)

Sets the search formula for the Advanced Search Wizard. The search formula is the formula used by the Advanced Search Wizard to query the report and return results to the user. If the setShowAdvSearchConditionsTab method is set to false, the user cannot change the formula/condition used to filter the records in the report. The formula is used to filter the records in the report and is not applied to the database directly. For example, if the report only contains records where country="Canada", and the advanced search formula is set to country="Japan", no records are displayed.

Parameters:
formula - a String that specifies the search formula for the Advanced Search Wizard

setAdvSearchResultPageSize

public void setAdvSearchResultPageSize(int size)

Sets the number of records to display per page for the Advanced Search Wizard result. The default value is 10.

Parameters:
size - an int that specifies the number of records to display per page for the Advanced Search Wizard result.

setAdvSearchShowFields

public void setAdvSearchShowFields(java.lang.String[] showFields)

Sets the fields to show for the Advanced Search Wizard. These are the fields that appear in the resulting data set. As an example, assume that the following (hypothetical) fields exist in the report: Customer.Name, Customer.Address and Customer.Orders. If the AdvSearchShowFields property is set to show Customer.Name then, in the results of the Advanced Search, only the Customer Name data appears.

Note: If the setShowAdvSearchFieldsTab property is set to false, the user cannot change the fields shown in the results.

Parameters:
showFields - a String array that specifies the fields to show for the Advanced Search Wizard