com.crystaldecisions.report.web.viewer
Class CrystalReportViewer

java.lang.Object
  extended by com.crystaldecisions.report.web.ServerControl
      extended by com.crystaldecisions.report.web.viewer.ReportServerControl
          extended by com.crystaldecisions.report.web.viewer.CrystalReportViewerBase
              extended by com.crystaldecisions.report.web.viewer.CrystalReportViewer

public class CrystalReportViewer
extends CrystalReportViewerBase

This class allows you to display a report in HTML and manipulate the view of the report. As well as methods to add listeners for specific events within the displayed report, there are methods for setting various options concerning how the report is displayed.


Field Summary
static java.lang.String PAGE_TYPE
          Specifies view type to be rendered as Page.
static java.lang.String TOOLBAR_TYPE
          Specifies view type to be rendered as Toolbar.
static java.lang.String TREE_TYPE
          Specifies view type to be rendered as GroupTree.
 
Fields inherited from class com.crystaldecisions.report.web.viewer.CrystalReportViewerBase
BACKWARD, FORWARD, NOACTION
 
Constructor Summary
CrystalReportViewer()
           
 
Method Summary
 void addDrillDownSubreportEventListener(DrillDownSubreportEventListener listener)
          Adds a listener for DrillDownSubreportEvents.
 void addNavigateEventListener(NavigateEventListener listener)
          Adds a listener for NavigateEvents.
 void addToolbarCommandEventListener(ToolbarCommandEventListener listener)
          Adds a listener for ToolbarCommandEvents.
 void drillDown(IGroupPath groupPath, java.lang.String groupName)
          Performs a drill down to the group in the report specified by the name and the path.
 CrDocumentViewTypeEnum getDocumentViewType()
          Gets the type of the view that is used display the document.
 int getGroupTreeWidth()
          Deprecated. As of Version 12, replaced by getToolPanelWidth.
 CrHtmlUnitEnum getGroupTreeWidthUnit()
          Deprecated. As of Version 12, replaced by getToolPanelWidthUnit.
 double getPageToTreeRatio()
          Deprecated. As of Version 10 in favor of getGroupTreeWidth and getGroupTreeWidthUnit.
 CrPrintMode getPrintMode()
           Returns the current print mode that will be used when the user clicks the print button.
 Toolbar getToolbar()
          Deprecated. As of Version 12. No replacement. As of Version 12, always returns null.
 CrToolPanelViewTypeEnum getToolPanelViewType()
          Gets the type of view that is displayed in the viewer's tool panel.
 int getToolPanelWidth()
           Returns the current width of the tool panel.
 CrHtmlUnitEnum getToolPanelWidthUnit()
           Returns whether pixels or percentage of the viewer width is used to determine the tool panel width.
 ViewInfo getViewInfo()
          Returns the ViewInfo object.
 int getZoomFactor()
          Returns the zoom factor that is currently set.
 boolean hasDrilldownTabs()
          Returns whether the report viewer has drilldown tabs.
 boolean hasExportButton()
          Returns whether the report viewer has an export button.
 boolean hasGotoPageButton()
          Returns whether the report viewer has a "Go to Page" button.
 boolean hasLogo()
          Returns whether the report viewer is set to display the company logo.
 boolean hasPageBottomToolbar()
          Deprecated. As of Version 12. No replacement. Always returns false.
 boolean hasPageNavigationButtons()
          Returns whether the report viewer has page navigation buttons.
 boolean hasPrintButton()
          Returns whether the report viewer has a print button.
 boolean hasRefreshButton()
          Returns whether the report viewer has a refresh button.
 boolean hasSearchButton()
          Returns whether the report viewer has a search button.
 boolean hasToggleGroupTreeButton()
          Returns whether the report viewer has a button for toggling the display of the group tree.
 boolean hasToggleParameterPanelButton()
          Returns whether the report viewer has a button for toggling the display of the parameter panel.
 boolean hasViewList()
          Deprecated. As of Version 12, replaced by hasDrilldownTabs.
 boolean hasZoomFactorList()
          Returns whether the report viewer has a zoom factor list.
 boolean isBestFitPage()
          Returns whether the viewer will ignore the height and width values it is given and try to find the best fit for the report by taking up as much space as it needs to properly display the report.
 boolean isDisplayGroupTree()
          Deprecated. As of Version 12, replaced by getToolPanelViewType.
 boolean isDisplayPage()
          Returns whether the report page is displayed.
 boolean isDisplayToolbar()
          Returns whether the toolbar is displayed.
 boolean isEnableDrillDown()
          Returns whether the user can drill down on the report.
 boolean isRenderAsHTML32()
          Deprecated. As of Version 12. No replacement. isRenderAsHTML32 is no longer supported and always returns false.
 boolean isSeparatePages()
          Returns whether each report page is displayed as a separate HTML page.
 boolean isShowAllPageIds()
          Deprecated. As of Version 12. No replacement. Always returns false.
 void removeDrillDownSubreportEventListener()
          Removes a DrillDownSubreportEventListener.
 void removeNavigateEventListener()
          Removes a NavigateEventListener.
 void removeToolbarCommandEventListener()
          Removes a ToolbarCommandEventListener.
 void searchText(java.lang.String strTextToSearch, int searchDirection)
          Highlights the first occurrence of the specified text in the report and scrolls to it.
 void setBestFitPage(boolean bestFitPage)
          Specifies whether the viewer should determine the size of the viewer based on the size of the report content to display.
 void setDisplayGroupTree(boolean newM_bDisplayGroupTree)
          Deprecated. As of Version 12, replaced by setToolPanelViewType.
 void setDisplayPage(boolean newM_bDisplayPage)
          Sets whether to display the report page.
 void setDisplayToolbar(boolean display)
          Sets whether to display the Toolbar.
 void setDocumentViewType(CrDocumentViewTypeEnum type)
          Sets the type of the view to display the document.
 void setEnableDrillDown(boolean enableDrillDown)
          Sets whether to enable drill down.
 void setGroupTreeWidth(int newGroupTreeWidth)
          Deprecated. As of Version 12, replaced by setToolPanelWidth.
 void setGroupTreeWidthUnit(CrHtmlUnitEnum newGroupTreeWidthUnit)
          Deprecated. As of Version 12, replaced by setToolPanelWidthUnit.
 void setHasDrilldownTabs(boolean newM_bHasDrilldownTabs)
          Sets whether to display drilldown tabs.
 void setHasExportButton(boolean newM_bHasExportButton)
          Sets whether to display the export button.
 void setHasGotoPageButton(boolean newM_bHasGotoPageButton)
          Sets whether to display the GotoPageButton.
 void setHasLogo(boolean newM_bHasLogo)
          Sets whether to display the company logo.
 void setHasPageBottomToolbar(boolean newHasPageBottomToolbar)
          Deprecated. As of Version 12. No replacement. Calling this method has no effect.
 void setHasPageNavigationButtons(boolean newM_bHasPageNavigationButtons)
          Sets whether to display the page navigation buttons.
 void setHasPrintButton(boolean newM_bHasPrintButton)
          Sets whether to display the print button.
 void setHasRefreshButton(boolean newM_bHasRefreshButton)
          Sets whether to display the refresh button.
 void setHasSearchButton(boolean newM_bHasSearchButton)
          Sets whether to include or exclude the search button and associated text box when rendering the report.
 void setHasToggleGroupTreeButton(boolean newM_bHasToggleButton)
          Sets whether to display the toggle group tree button.
 void setHasToggleParameterPanelButton(boolean newM_bHasToggleParameterPanelButton)
          Sets whether to display the toggle parameter panel button.
 void setHasViewList(boolean newM_bHasViewList)
          Deprecated. As of Version 12, replaced by setHasDrilldownTabs.
 void setHasZoomFactorList(boolean newM_bHasZoomButton)
          Sets whether to display a zoom factor list.
 void setPageToTreeRatio(double newM_nPageToTreeRatio)
          Deprecated. As of Version 10 in favor of setGroupTreeWidth and setGroupTreeWidthUnit.
 void setPrintMode(CrPrintMode printMode)
           Sets whether to print using PDF or ActiveX print mode when the user clicks the print button.
 void setRenderAsHTML32(boolean newM_bRenderAsHTML32)
          Deprecated. As of Version 12. No replacement. Calling this method has no effect.
 void setSeparatePages(boolean separate)
          Sets whether the report is displayed as separate pages or one long page.
 void setShowAllPageIds(boolean showAllPageIds)
          Deprecated. As of Version 12. No replacement. Calling this method has no effect.
 void setToolPanelViewType(CrToolPanelViewTypeEnum type)
          Sets the type of view to display in the tool panel.
 void setToolPanelWidth(int newWidth)
           Sets the width of the tool panel.
 void setToolPanelWidthUnit(CrHtmlUnitEnum newWidthUnit)
           Sets whether to use pixels or percentage of the viewer width to determine the tool panel width.
 void setZoomFactor(int zoomFactor)
          Sets a new zoom factor for displaying the report.
 void showFirstPage()
          Displays the first page of the report.
 void showLastPage()
          Displays the last page of the report.
 void showNextPage()
          Displays the next page of the report.
 void showNthPage(int pageNumber)
          Displays the specified page of the report.
 void showPreviousPage()
          Displays the previous page of the report.
 
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
 

Field Detail

TOOLBAR_TYPE

public static final java.lang.String TOOLBAR_TYPE

Specifies view type to be rendered as Toolbar.

See Also:
Constant Field Values

TREE_TYPE

public static final java.lang.String TREE_TYPE

Specifies view type to be rendered as GroupTree.

See Also:
Constant Field Values

PAGE_TYPE

public static final java.lang.String PAGE_TYPE

Specifies view type to be rendered as Page.

See Also:
Constant Field Values
Constructor Detail

CrystalReportViewer

public CrystalReportViewer()
Method Detail

addDrillDownSubreportEventListener

public void addDrillDownSubreportEventListener(DrillDownSubreportEventListener listener)
                                        throws java.util.TooManyListenersException

Adds a listener for DrillDownSubreportEvents.

Parameters:
listener - The DrillDownSubreportEventListener.
Throws:
java.util.TooManyListenersException - This is thrown if you attempt to add more than one listener on a particular listener source concurrently.
See Also:
removeDrillDownSubreportEventListener

addNavigateEventListener

public void addNavigateEventListener(NavigateEventListener listener)
                              throws java.util.TooManyListenersException

Adds a listener for NavigateEvents.

Parameters:
listener - The NavigateEventsListener.
Throws:
java.util.TooManyListenersException - This is thrown if you attempt to add more than one listener on a particular listener source concurrently.
See Also:
removeNavigateEventListener

addToolbarCommandEventListener

public void addToolbarCommandEventListener(ToolbarCommandEventListener listener)
                                    throws java.util.TooManyListenersException

Adds a listener for ToolbarCommandEvents.

Parameters:
listener - The ToolbarCommandEventListener.
Throws:
java.util.TooManyListenersException - This is thrown if you attempt to add more than one listener on a particular listener source concurrently.
See Also:
removeToolbarCommandEventListener

drillDown

public void drillDown(IGroupPath groupPath,
                      java.lang.String groupName)

Performs a drill down to the group in the report specified by the name and the path.

Note: When drilling down to a group in the report programmatically, ensure that drillDown is only called the first time the viewer is loaded. You can achieve this by making the call to drillDown conditional before calling processHttpRequest as follows:

         if(not postback)
                {drillDown(path, name);}
         processHttpRequest(request, response, context, out);
        

Parameters:
groupPath - An IGroupPath object that specifies the path of the group to drill down on.
groupName - A String that specifies the name of the group to drill down on.

getGroupTreeWidth

public int getGroupTreeWidth()
Deprecated. As of Version 12, replaced by getToolPanelWidth.

Returns the current width of the group tree. This value can either be specified in pixels or as a percentage, depending on the value returned by getGroupTreeWidthUnit.

Returns:
An int specifying the current width of the group tree.
See Also:
setGroupTreeWidth

getToolPanelWidth

public int getToolPanelWidth()

Returns the current width of the tool panel. This value can either be specified in pixels or as a percentage, depending on the value returned by getToolPanelWidthUnit.

Returns:
An int specifying the current width of the tool panel.
See Also:
setToolPanelWidth

getGroupTreeWidthUnit

public CrHtmlUnitEnum getGroupTreeWidthUnit()
Deprecated. As of Version 12, replaced by getToolPanelWidthUnit.

Returns whether pixels or percentage of the viewer width is used to determine the group tree width.

Returns:
A CrHtmlUnitEnum object specifying the unit being used to determine the group tree width.
See Also:
CrHtmlUnitEnum, setGroupTreeWidthUnit

getToolPanelWidthUnit

public CrHtmlUnitEnum getToolPanelWidthUnit()

Returns whether pixels or percentage of the viewer width is used to determine the tool panel width.

Returns:
A CrHtmlUnitEnum object specifying the unit being used to determine the tool panel width.
See Also:
CrHtmlUnitEnum, setToolPanelWidthUnit

getToolbar

public Toolbar getToolbar()
Deprecated. As of Version 12. No replacement. As of Version 12, always returns null.

Returns the Toolbar object.

Returns:
The Toolbar object.

getViewInfo

public ViewInfo getViewInfo()

Returns the ViewInfo object. The ViewInfo object is used to obtain information for the client that is not available from the specific listener that is being used.

For example, if you were using the event handler for the NavigateEventListener, you could use the following to access the group name from the ViewInfo object:

 public void navigate (NavigateEvents e){
 String groupName = ((CrystalReportViewer) (e.getSource()).getViewInfo().getGroupName();
 

Returns:
The ViewInfo object.

getZoomFactor

public int getZoomFactor()

Returns the zoom factor that is currently set.

Returns:
The zoom factor as an int.
See Also:
hasZoomFactorList, setHasZoomFactorList, setZoomFactor

hasExportButton

public boolean hasExportButton()

Returns whether the report viewer has an export button.

Returns:
true if the viewer has an export button and false otherwise.
See Also:
setHasExportButton

hasGotoPageButton

public boolean hasGotoPageButton()

Returns whether the report viewer has a "Go to Page" button.

Returns:
true if the viewer has a "Go to Page" button and false otherwise.
See Also:
setHasGotoPageButton

hasLogo

public boolean hasLogo()

Returns whether the report viewer is set to display the company logo.

Returns:
true if the viewer is set to display the company logo and false otherwise.
See Also:
setHasLogo

hasPageNavigationButtons

public boolean hasPageNavigationButtons()

Returns whether the report viewer has page navigation buttons.

Returns:
true if the viewer has page navigation buttons and false otherwise.
See Also:
setHasPageNavigationButtons

hasPrintButton

public boolean hasPrintButton()

Returns whether the report viewer has a print button.

Returns:
true if the viewer has a print button and false otherwise.
See Also:
setHasPrintButton

hasRefreshButton

public boolean hasRefreshButton()

Returns whether the report viewer has a refresh button.

Returns:
true if the viewer has a refresh button and false otherwise.
See Also:
setHasRefreshButton

hasSearchButton

public boolean hasSearchButton()

Returns whether the report viewer has a search button.

Returns:
true if the viewer has a search button and false otherwise.
See Also:
setHasSearchButton

hasToggleGroupTreeButton

public boolean hasToggleGroupTreeButton()

Returns whether the report viewer has a button for toggling the display of the group tree.

Returns:
true if the viewer has a group tree button and false otherwise.
See Also:
setHasToggleGroupTreeButton

hasToggleParameterPanelButton

public boolean hasToggleParameterPanelButton()

Returns whether the report viewer has a button for toggling the display of the parameter panel.

Returns:
true if the viewer has a parameter panel button and false otherwise.
See Also:
setHasToggleParameterPanelButton

hasViewList

public boolean hasViewList()
Deprecated. As of Version 12, replaced by hasDrilldownTabs.

Returns whether the report viewer has a view list.

Note: The view list has been replaced by tabs in Version 12.

See Also:
setHasViewList

hasDrilldownTabs

public boolean hasDrilldownTabs()

Returns whether the report viewer has drilldown tabs.

Returns:
true if the viewer has drilldown tabs and false otherwise.
See Also:
setHasDrilldownTabs

hasZoomFactorList

public boolean hasZoomFactorList()

Returns whether the report viewer has a zoom factor list.

Returns:
true if the viewer has a zoom factor list and false otherwise.
See Also:
getZoomFactor, setHasZoomFactorList, setZoomFactor

isBestFitPage

public boolean isBestFitPage()

Returns whether the viewer will ignore the height and width values it is given and try to find the best fit for the report by taking up as much space as it needs to properly display the report.

Returns:
true if the values of the Height and Width properties are overridden so that the viewer size expands to fit the report content. false if the values of the Height and Width properties are used to display the pages. If the viewer content is larger than the specified Height and Width values, scrollbars will appear in the page to allow all of the content to be viewed.
See Also:
setBestFitPage

isDisplayGroupTree

public boolean isDisplayGroupTree()
Deprecated. As of Version 12, replaced by getToolPanelViewType.

Returns whether the group tree is displayed.

If the HasToggleGroupTreeButton property is set to true, the user can choose to display the group tree by selecting this button. To remove the ability to view the group tree, both the setHasToggleGroupTreeButton and setDisplayGroupTree methods must be set to false.

Returns:
true if the group tree is displayed and false otherwise.
See Also:
setDisplayGroupTree

isDisplayPage

public boolean isDisplayPage()

Returns whether the report page is displayed.

Note: If setDisplayPage is false, the toolbar is not displayed regardless of the value of the setDisplayToolbar method.

Returns:
true if the report page is displayed and false otherwise.
See Also:
setDisplayPage

isDisplayToolbar

public boolean isDisplayToolbar()

Returns whether the toolbar is displayed.

Note: If the setDisplayToolbar property is false, the toolbar buttons are not displayed regardless of the values of the "Has Button" properties.

Returns:
true if the toolbar is displayed and false otherwise.
See Also:
setDisplayToolbar

hasPageBottomToolbar

public boolean hasPageBottomToolbar()
Deprecated. As of Version 12. No replacement. Always returns false.

Returns whether the viewer displays a bottom toolbar.

Note: As of Version 12, the default value is false as the viewer no longer has a bottom toolbar.

Returns:
A boolean that specifies whether the viewer displays a bottom toolbar.
See Also:
setHasPageBottomToolbar

isEnableDrillDown

public boolean isEnableDrillDown()

Returns whether the user can drill down on the report.

Returns:
true if the user can drill down on the report and false otherwise.
See Also:
setEnableDrillDown

isRenderAsHTML32

public boolean isRenderAsHTML32()
Deprecated. As of Version 12. No replacement. isRenderAsHTML32 is no longer supported and always returns false.

Returns whether the report is rendered as HTML 3.2.

Returns:
true if the report is rendered as HTML 3.2 and false otherwise.
See Also:
setRenderAsHTML32

isSeparatePages

public boolean isSeparatePages()

Returns whether each report page is displayed as a separate HTML page. It is not recommended that you set setSeparatePages to false when displaying longer reports as the report will not display until the report has been fully loaded. When setSeparatePages is set to false searchText will not be available.

Returns:
true if the report is displayed as separate pages and false otherwise.
See Also:
setSeparatePages

isShowAllPageIds

public boolean isShowAllPageIds()
Deprecated. As of Version 12. No replacement. Always returns false.

Returns whether PageIds are added to the HTML content. If page IDs are added to the HTML additional content, they will be added to the beginning of the HTML div tags to identify the individual report elements.

Returns:
true if the additional PageIds are added to the HTML content and false otherwise.
See Also:
setShowAllPageIds

removeDrillDownSubreportEventListener

public void removeDrillDownSubreportEventListener()

Removes a DrillDownSubreportEventListener.

See Also:
addDrillDownSubreportEventListener

removeNavigateEventListener

public void removeNavigateEventListener()

Removes a NavigateEventListener.

See Also:
addNavigateEventListener

removeToolbarCommandEventListener

public void removeToolbarCommandEventListener()

Removes a ToolbarCommandEventListener.

See Also:
addToolbarCommandEventListener

searchText

public void searchText(java.lang.String strTextToSearch,
                       int searchDirection)

Highlights the first occurrence of the specified text in the report and scrolls to it.

Note: The text search begins on the following page. To search the first page of a report or to search a report that is displayed continuously (that is, where setSeparatePages is set to false), you must use the browser's search function.

Parameters:
strTextToSearch - A String that specifies the text string to search for in the report.
searchDirection - An int that specifies the search direction. Currently, the only available value is 0 for forward.

setBestFitPage

public void setBestFitPage(boolean bestFitPage)

Specifies whether the viewer should determine the size of the viewer based on the size of the report content to display.

Parameters:
bestFitPage - true to find the best fit for the report, otherwise false to use the height and width values it is given.
See Also:
isBestFitPage

setDisplayGroupTree

public void setDisplayGroupTree(boolean newM_bDisplayGroupTree)
Deprecated. As of Version 12, replaced by setToolPanelViewType.

Sets whether to display the group tree.

Parameters:
newM_bDisplayGroupTree - true to display the group tree.
See Also:
isDisplayGroupTree

setDisplayPage

public void setDisplayPage(boolean newM_bDisplayPage)

Sets whether to display the report page.

Parameters:
newM_bDisplayPage - true to display the report page.
See Also:
isDisplayPage

setDisplayToolbar

public void setDisplayToolbar(boolean display)

Sets whether to display the Toolbar.

Parameters:
display - true to display the Toolbar.
See Also:
isDisplayToolbar

setHasPageBottomToolbar

public void setHasPageBottomToolbar(boolean newHasPageBottomToolbar)
Deprecated. As of Version 12. No replacement. Calling this method has no effect.

Specifies whether the viewer displays a bottom toolbar.

Note: As of Version 12 the viewer no longer has a bottom toolbar.

Parameters:
newHasPageBottomToolbar - set to true to display a bottom toolbar, false otherwise.
See Also:
hasPageBottomToolbar

setEnableDrillDown

public void setEnableDrillDown(boolean enableDrillDown)

Sets whether to enable drill down.

Parameters:
enableDrillDown - true to enable drill down.
See Also:
isEnableDrillDown

setGroupTreeWidth

public void setGroupTreeWidth(int newGroupTreeWidth)
Deprecated. As of Version 12, replaced by setToolPanelWidth.

Sets the width of the group tree. This value can be either be specified in pixels or as a percentage of the viewer width, by passing the appropriate CrHtmlUnitEnum object to setGroupTreeWidthUnit.

The units for the setGroupTreeWidth method are determined by the setGroupTreeWidthUnit method.

Parameters:
newGroupTreeWidth - An int specifying the new width of the group tree.
See Also:
getGroupTreeWidth

setToolPanelWidth

public void setToolPanelWidth(int newWidth)

Sets the width of the tool panel. This value can either be specified in pixels or as a percentage of the viewer width, by passing the appropriate CrHtmlUnitEnum object to setToolPanelWidthUnit.

The units for the setToolPanelWidth method are determined by the setToolPanelWidthUnit method.

Parameters:
newWidth - An int specifying the new width of the tool panel.
See Also:
getToolPanelWidth

setGroupTreeWidthUnit

public void setGroupTreeWidthUnit(CrHtmlUnitEnum newGroupTreeWidthUnit)
Deprecated. As of Version 12, replaced by setToolPanelWidthUnit.

Sets whether to use pixels or percentage of the viewer width to determine the group tree width.

Parameters:
newGroupTreeWidthUnit - A CrHtmlUnitEnum object specifying the unit to use to determine group tree width.
See Also:
CrHtmlUnitEnum, getGroupTreeWidthUnit

setToolPanelWidthUnit

public void setToolPanelWidthUnit(CrHtmlUnitEnum newWidthUnit)

Sets whether to use pixels or percentage of the viewer width to determine the tool panel width.

Parameters:
newWidthUnit - A CrHtmlUnitEnum object specifying the unit to use to determine tool panel width.
See Also:
CrHtmlUnitEnum, getToolPanelWidthUnit

setPrintMode

public void setPrintMode(CrPrintMode printMode)

Sets whether to print using PDF or ActiveX print mode when the user clicks the print button. In PDF print mode, a PDF will be displayed, allowing the user to then print it. In ActiveX print mode, a small ActiveX control is downloaded to the client machine to execute the print job. If ActiveX print mode is selected on a system that does not support ActiveX controls, the print mode will default to PDF printing.

Parameters:
printMode - A CrPrintMode object specifying the print mode to be used.
See Also:
getPrintMode()

getPrintMode

public CrPrintMode getPrintMode()

Returns the current print mode that will be used when the user clicks the print button.

Returns:
A CrPrintMode object specifying the print mode currently being used.
See Also:
setPrintMode(com.crystaldecisions.report.web.viewer.CrPrintMode)

setHasExportButton

public void setHasExportButton(boolean newM_bHasExportButton)

Sets whether to display the export button.

Parameters:
newM_bHasExportButton - true to display the export button.
See Also:
hasExportButton

setHasGotoPageButton

public void setHasGotoPageButton(boolean newM_bHasGotoPageButton)

Sets whether to display the GotoPageButton.

Note: If true, the HTML returned includes a text box, into which the user can type a page number to navigate to a specific page in the report. If false, the HTML returned displays the current page, but does not allow the user to navigate by page number. The default value is true.

Parameters:
newM_bHasGotoPageButton - true to display the GotoPageButton button.
See Also:
hasGotoPageButton

setHasLogo

public void setHasLogo(boolean newM_bHasLogo)

Sets whether to display the company logo.

Parameters:
newM_bHasLogo - true to display the company logo.
See Also:
hasLogo

setHasPageNavigationButtons

public void setHasPageNavigationButtons(boolean newM_bHasPageNavigationButtons)

Sets whether to display the page navigation buttons.

The page navigation buttons include the first, last, previous, and next page buttons, the go to page text box and the page number label. This property applies to both the top and bottom toolbars.

Parameters:
newM_bHasPageNavigationButtons - true to display page navigation buttons.
See Also:
hasPageNavigationButtons

setHasPrintButton

public void setHasPrintButton(boolean newM_bHasPrintButton)

Sets whether to display the print button.

Note: If the PrintMode property is set to 0 (PDF), printing is accomplished by automatically exporting the report to PDF; the user can then print the PDF. If the PrintMode property is set to 1 (ActiveX), a small ActiveX control is downloaded to the client machine to execute the print job.

Parameters:
newM_bHasPrintButton - true to display the print button.
See Also:
hasPrintButton

setHasRefreshButton

public void setHasRefreshButton(boolean newM_bHasRefreshButton)

Sets whether to display the refresh button.

Note: To avoid inconsistencies in the report data, it is recommended that you cache the report source when refreshing the report.

Parameters:
newM_bHasRefreshButton - true to display the refresh button.
See Also:
hasRefreshButton

setHasSearchButton

public void setHasSearchButton(boolean newM_bHasSearchButton)

Sets whether to include or exclude the search button and associated text box when rendering the report.

Parameters:
newM_bHasSearchButton - true to display the search button.
See Also:
hasSearchButton

setHasToggleGroupTreeButton

public void setHasToggleGroupTreeButton(boolean newM_bHasToggleButton)

Sets whether to display the toggle group tree button.

Parameters:
newM_bHasToggleButton - true to display the toggle button.
See Also:
hasToggleGroupTreeButton

setHasToggleParameterPanelButton

public void setHasToggleParameterPanelButton(boolean newM_bHasToggleParameterPanelButton)

Sets whether to display the toggle parameter panel button.

Parameters:
newM_bHasToggleParameterPanelButton - true to display the parameter panel toggle button.
See Also:
hasToggleParameterPanelButton

setHasViewList

public void setHasViewList(boolean newM_bHasViewList)
Deprecated. As of Version 12, replaced by setHasDrilldownTabs.

Sets whether to display the view list.

Note: The view list has been replaced by tabs in Version 12.

Parameters:
newM_bHasViewList - value does not affect viewer rendering
See Also:
hasViewList

setHasDrilldownTabs

public void setHasDrilldownTabs(boolean newM_bHasDrilldownTabs)

Sets whether to display drilldown tabs.

Parameters:
newM_bHasDrilldownTabs - value does not affect viewer rendering
See Also:
hasDrilldownTabs

setHasZoomFactorList

public void setHasZoomFactorList(boolean newM_bHasZoomButton)

Sets whether to display a zoom factor list.

Parameters:
newM_bHasZoomButton - true to display a zoom factor list.
See Also:
getZoomFactor, hasZoomFactorList, setZoomFactor

setRenderAsHTML32

public void setRenderAsHTML32(boolean newM_bRenderAsHTML32)
Deprecated. As of Version 12. No replacement. Calling this method has no effect.

Sets whether to render the content as HTML 3.2.

Note: This method is no longer supported and does not affect viewer rendering.

Parameters:
newM_bRenderAsHTML32 - true to display the content as HTML 3.2.
See Also:
isRenderAsHTML32

setSeparatePages

public void setSeparatePages(boolean separate)

Sets whether the report is displayed as separate pages or one long page. It is not recommended that you set to this false when displaying longer reports as the report will not display until the report has been fully loaded. When set to false searchText will not be available.

Note: It can take a considerable length of time for long reports to load continuously. Additionally, some browsers have memory limits that will cause long HTML pages to display incorrectly. Setting the setSeparatePages method to false is only recommended for reports that have a few pages.

Parameters:
separate - true if the report is displayed as separate pages.
See Also:
isSeparatePages

setShowAllPageIds

public void setShowAllPageIds(boolean showAllPageIds)
Deprecated. As of Version 12. No replacement. Calling this method has no effect.

Sets whether PageIds are added to the HTML content. If page IDs are added to the HTML additional content, they will be added to the beginning of the HTML div tags to identify the page.

Parameters:
showAllPageIds - true if the additional PageIds are added to the HTML content.
See Also:
isShowAllPageIds

setToolPanelViewType

public void setToolPanelViewType(CrToolPanelViewTypeEnum type)

Sets the type of view to display in the tool panel.

The tool panel can display the group tree or the parameter panel. Setting the type CrToolPanelViewTypeEnum.none hides the tool panel.

Parameters:
type - A CrToolPanelViewTypeEnum constant specifying the view displayed in the tool panel.
See Also:
CrToolPanelViewTypeEnum, getToolPanelViewType

getToolPanelViewType

public CrToolPanelViewTypeEnum getToolPanelViewType()

Gets the type of view that is displayed in the viewer's tool panel.

Returns:
A CrToolPanelViewTypeEnum constant specifying the view displayed in the tool panel.
See Also:
CrToolPanelViewTypeEnum, setToolPanelViewType

setDocumentViewType

public void setDocumentViewType(CrDocumentViewTypeEnum type)

Sets the type of the view to display the document.

The document can display the report in print or web layout.

Parameters:
type - A CrDocumentViewTypeEnum constant specifying the view displayed in the viewer.
See Also:
CrDocumentViewTypeEnum, getDocumentViewType

getDocumentViewType

public CrDocumentViewTypeEnum getDocumentViewType()

Gets the type of the view that is used display the document.

Returns:
A CrDocumentViewTypeEnum constant specifying the view displayed in the viewer.
See Also:
CrDocumentViewTypeEnum, setDocumentViewType

setZoomFactor

public void setZoomFactor(int zoomFactor)

Sets a new zoom factor for displaying the report. Acceptable values for the zoom factor range from 10 to 400 percent.

Parameters:
zoomFactor - An int that specifies the value for the zoom factor.
See Also:
getZoomFactor, hasZoomFactorList, setHasZoomFactorList

showFirstPage

public void showFirstPage()

Displays the first page of the report.

See Also:
showLastPage, showNextPage, showNthPage, showPreviousPage

showLastPage

public void showLastPage()

Displays the last page of the report.

See Also:
showFirstPage, showNextPage, showNthPage, showPreviousPage

showNextPage

public void showNextPage()

Displays the next page of the report.

Note: If the last page of the report is currently displayed, the viewer remains on this page.

See Also:
showFirstPage, showLastPage, showNthPage, showPreviousPage

showNthPage

public void showNthPage(int pageNumber)

Displays the specified page of the report.

Note: If the report has no Nth page, the last page of the report is displayed.

Note: When jumping to a specific page in the report programmatically, ensure that showNthPage is only called the first time the viewer is loaded. You can achieve this by making the call to showNthPage conditional before calling processHttpRequest as follows:

         if(not postback)
                {showNthPage(pageNumber);}
         processHttpRequest(request, response, context, out);
        

Parameters:
pageNumber - An int that specifies the page of the report to be displayed.
See Also:
showFirstPage, showLastPage, showNextPage, showPreviousPage

showPreviousPage

public void showPreviousPage()

Displays the previous page of the report.

Note: If the first page of the report is currently displayed, the viewer remains on this page.

See Also:
showFirstPage, showLastPage, showNextPage, showNthPage

getPageToTreeRatio

public double getPageToTreeRatio()
Deprecated. As of Version 10 in favor of getGroupTreeWidth and getGroupTreeWidthUnit.

Returns the page to tree ratio. This indicates the percentage of the report viewer that will be used to display the page as compared to the tree.

Returns:
The page to tree ration as a double.

setPageToTreeRatio

public void setPageToTreeRatio(double newM_nPageToTreeRatio)
Deprecated. As of Version 10 in favor of setGroupTreeWidth and setGroupTreeWidthUnit.

Sets the page to tree ratio. This indicates the percentage of the report viewer that will be used to display the page as compared to the tree.

Parameters:
newM_nPageToTreeRatio - The page to tree ratio as a double.