com.crystaldecisions.report.web.viewer
Class CrystalReportPartsViewer

java.lang.Object
  extended bycom.crystaldecisions.report.web.ServerControl
      extended bycom.crystaldecisions.report.web.viewer.ReportServerControl
          extended bycom.crystaldecisions.report.web.viewer.CrystalReportViewerBase
              extended bycom.crystaldecisions.report.web.viewer.CrystalReportPartsViewer

public class CrystalReportPartsViewer
extends CrystalReportViewerBase

This class provides the functionality to view individual report parts, such as chart, text, or field objects. This viewer can also produce output in mobile and PDA format.

Note: Mobile and PDA formats are not supported by the Java Reporting Component.

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


Constructor Summary
CrystalReportPartsViewer()
           
 
Method Summary
 void addDrillReportPartsEventListener(DrillReportPartsEventListener listener)
          Adds a listener for DrillReportPartsEventArgs.
 java.lang.String getMobileDevicesCharset()
          Returns the charset currently set for mobile devices.
 int getRecordNumber()
          Returns the number of records displayed per page.
 java.lang.Object getReportParts()
          Returns an Object that defines the report parts to display in the viewer.
 java.lang.String getReportTitle()
          Returns the title displayed at the top of the viewer.
 int getZoomFactor()
          Returns the magnification to use when the viewer loads a report.
 boolean hasBorder()
          Returns whether a border is included when rendering the viewer.
 boolean hasPageNavigationLinks()
          Returns whether page navigation links are included when rendering the viewer.
 boolean isDisplayHeadings()
          Returns whether the viewer will display report object names.
 boolean isDisplayTitle()
          Returns whether the viewer will display the report title.
 boolean isEnableDrillDown()
          Returns whether the user can drill down on report parts.
 boolean isEnableImageForMobileDevices()
          Returns whether the report part viewer is enabled for mobile devices.
 boolean isFirstPage()
          Returns whether the current page is the first page.
 boolean isLastPage()
          Returns whether the current page is the last page.
 boolean isPreserveLayout()
          Returns whether the page layout is preserved when rendering the report parts.
 boolean isRotateSections()
          Returns whether the viewer will rotate sections (that is, convert columns to rows or convert rows to columns).
 void nextPage()
          Displays the next page of the report.
 void prevPage()
          Displays the previous page of the report.
 void removeDrillReportPartsEventListener()
          Removes a listener for DrillReportPartsEventArgs.
 void setDisplayHeadings(boolean newDisplayHeadings)
          Sets whether the viewer will display report object names.
 void setDisplayTitle(boolean newDisplayTitle)
          Sets whether the viewer will display the report title.
 void setEnableDrillDown(boolean enable)
          Sets whether the user can drill down on report parts.
 void setEnableImageForMobileDevices(boolean value)
          Sets whether the report part viewer is enabled for mobile devices.
 void setHasBorder(boolean border)
          Sets whether a border is included when rendering the viewer.
 void setHasPageNavigationLinks(boolean newHasPageNavigationButtons)
          Sets whether page navigation links are included when rendering the viewer.
 void setMobileDevicesCharset(java.lang.String charset)
          Sets the charset used for mobile devices.
 void setPreserveLayout(boolean preserve)
          Sets whether the report page layout is preserved when rendering the report parts.
 void setRecordNumber(int recordNumber)
          Sets the number of records to display per page.
 void setReportParts(java.lang.Object reportParts)
          Sets an Object that defines the report parts to display in the viewer.
 void setReportTitle(java.lang.String newReportTitle)
          Sets the title displayed at the top of the viewer.
 void setRotateSections(boolean rotate)
          Sets whether the viewer will rotate sections (that is, convert columns to rows or convert rows to columns).
 void setZoomFactor(int zoomFactor)
          Sets the magnification to use when the viewer loads a 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
 

Constructor Detail

CrystalReportPartsViewer

public CrystalReportPartsViewer()
Method Detail

addDrillReportPartsEventListener

public void addDrillReportPartsEventListener(DrillReportPartsEventListener listener)
                                      throws java.util.TooManyListenersException

Adds a listener for DrillReportPartsEventArgs. These events are fired when drilling down on a report part.

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

getRecordNumber

public int getRecordNumber()

Returns the number of records displayed per page.

Note: The default value is 10.

Returns:
The number of records displayed per page as an int.
See Also:
setRecordNumber

getReportParts

public java.lang.Object getReportParts()

Returns an Object that defines the report parts to display in the viewer.

Note: Cast the Object returned as a ReportPartsDefinition object.

Note: This method is not supported by the Java Reporting Component.

Returns:
The report parts to display in the viewer as an Object.
See Also:
setReportParts

getReportTitle

public java.lang.String getReportTitle()

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:
setReportTitle

getZoomFactor

public int getZoomFactor()

Returns the magnification to use when the viewer loads a report.

Returns:
The magnification to use when the viewer loads a report as an int.
See Also:
setZoomFactor

hasBorder

public boolean hasBorder()

Returns whether a border is included when rendering the viewer.

Returns:
true if a border is included when rendering the viewer and false otherwise.
See Also:
setHasBorder

hasPageNavigationLinks

public boolean hasPageNavigationLinks()

Returns whether page navigation links are included when rendering the viewer.

Returns:
true if page navigation links are included when rendering the viewer and false otherwise.
See Also:
setHasPageNavigationLinks

isDisplayHeadings

public boolean isDisplayHeadings()

Returns whether the viewer will display report object names.

Returns:
true if the viewer will display report object names and false otherwise.
See Also:
setDisplayHeadings

isDisplayTitle

public boolean isDisplayTitle()

Returns whether the viewer will display the report title.

Returns:
true if the viewer will display the report title and false otherwise.
See Also:
setDisplayTitle

isEnableDrillDown

public boolean isEnableDrillDown()

Returns whether the user can drill down on report parts.

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

isEnableImageForMobileDevices

public boolean isEnableImageForMobileDevices()

Returns whether the report part viewer is enabled for mobile devices. If false the report part viewer will only display text and will not display charts or images for mobile devices.

Returns:
true if images are enabled for mobile devices and false otherwise.
See Also:
setEnableImageForMobileDevices

isFirstPage

public boolean isFirstPage()
                    throws ReportSDKExceptionBase

Returns whether the current page is the first page.

Returns:
true the current page is the first page and false otherwise.
Throws:
ReportSDKExceptionBase
See Also:
isLastPage, nextPage, prevPage

isLastPage

public boolean isLastPage()
                   throws ReportSDKExceptionBase

Returns whether the current page is the last page.

Returns:
true the current page is the last page and false otherwise.
Throws:
ReportSDKExceptionBase
See Also:
isFirstPage, nextPage, prevPage

isPreserveLayout

public boolean isPreserveLayout()

Returns whether the page layout is preserved when rendering the report parts.

Returns:
true if the page layout is preserved when rendering the report parts and false otherwise.
See Also:
setPreserveLayout

isRotateSections

public boolean isRotateSections()

Returns whether the viewer will rotate sections (that is, convert columns to rows or convert rows to columns).

Returns:
true if the viewer will rotate sections and false otherwise.
See Also:
setRotateSections

nextPage

public void nextPage()

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:
isFirstPage, isLastPage, prevPage

prevPage

public void prevPage()

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:
isFirstPage, isLastPage, nextPage

removeDrillReportPartsEventListener

public void removeDrillReportPartsEventListener()

Removes a listener for DrillReportPartsEventArgs. These events are fired when drilling down on a report part.

See Also:
addDrillReportPartsEventListener

setDisplayHeadings

public void setDisplayHeadings(boolean newDisplayHeadings)

Sets whether the viewer will display report object names.

Parameters:
newDisplayHeadings - true to set the viewer to display report object names.
See Also:
isDisplayHeadings

setDisplayTitle

public void setDisplayTitle(boolean newDisplayTitle)

Sets whether the viewer will display the report title.

Parameters:
newDisplayTitle - true to set the viewer to display the report title.
See Also:
isDisplayTitle

setEnableDrillDown

public void setEnableDrillDown(boolean enable)

Sets whether the user can drill down on report parts.

Parameters:
enable - true to allow the user to drill down on report parts.
See Also:
isEnableDrillDown

setEnableImageForMobileDevices

public void setEnableImageForMobileDevices(boolean value)

Sets whether the report part viewer is enabled for mobile devices. If false the report part viewer will only display text and will not display charts or images for mobile devices.

Parameters:
value - true if images are enabled for mobile devices, otherwise false
See Also:
isEnableImageForMobileDevices

setHasBorder

public void setHasBorder(boolean border)

Sets whether a border is included when rendering the viewer.

Parameters:
border - true to include a border when rendering the viewer.
See Also:
hasBorder

setHasPageNavigationLinks

public void setHasPageNavigationLinks(boolean newHasPageNavigationButtons)

Sets whether page navigation links are included when rendering the viewer.

Parameters:
newHasPageNavigationButtons - true to include page navigation links when rendering the viewer.
See Also:
hasPageNavigationLinks

setPreserveLayout

public void setPreserveLayout(boolean preserve)

Sets whether the report page layout is preserved when rendering the report parts.

Parameters:
preserve - true to preserve the page layout when rendering the report parts.
See Also:
isPreserveLayout

setRecordNumber

public void setRecordNumber(int recordNumber)

Sets the number of records to display per page.

Note: The default value is 10.

Parameters:
recordNumber - An int that specifies the number of records to display per page.
See Also:
getRecordNumber

setReportParts

public void setReportParts(java.lang.Object reportParts)

Sets an Object that defines the report parts to display in the viewer. The Object should be an instance of the ReportPartsDefinition class.

Note: If set, the setReportParts method overrides the one specified in the report. The default value is null. In the default case, the report must define the initial report parts.

Note: This method is not supported by the Java Reporting Component.

Parameters:
reportParts - An Object that defines the report parts to display in the viewer.
See Also:
getReportParts

setReportTitle

public void setReportTitle(java.lang.String newReportTitle)

Sets the title displayed at the top of the viewer.

Note:

Parameters:
newReportTitle - A String that specifies the title displayed at the top of the viewer.
See Also:
getReportTitle()

setRotateSections

public void setRotateSections(boolean rotate)

Sets whether the viewer will rotate sections (that is, convert columns to rows or convert rows to columns).

Parameters:
rotate - true to rotate sections in the viewer.
See Also:
isRotateSections

setZoomFactor

public void setZoomFactor(int zoomFactor)

Sets the magnification to use when the viewer loads a report.

Note: The zoom factor must be set to a value not less than 10 and not greater than 400.

Parameters:
zoomFactor - An int that specifies the magnification to use when the viewer loads a report.
See Also:
getZoomFactor

getMobileDevicesCharset

public java.lang.String getMobileDevicesCharset()

Returns the charset currently set for mobile devices.

Returns:
a String that specifies the charset currently set for mobile devices.

setMobileDevicesCharset

public void setMobileDevicesCharset(java.lang.String charset)

Sets the charset used for mobile devices.

Parameters:
charset - a String that specifies the charset to use for mobile devices.