Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

3.06 CrystalReportViewer Properties and Methods

Table 3-3. CrystalReportViewer Properties

Property Description
DisplayBackgroundEdge A background edge creates a border around the edge of the report page in preview mode. Setting this to False makes the edge of the page flush against the viewer’s window.
DisplayGroupTree Toggles the Group Tree window on and off.
DisplayToolbar Toggles the toolbar on and off.
EnableDrillDown Sets whether the user can drill down on reports.
ShowCloseButton Sets whether the Close button is available.
ShowExportButton Sets whether the Export button is available.
ShowGotoPageButton Sets whether the GotoPage button is available.
ShowGroupTreeButton Sets whether the GroupTree button is available.
ShowPrintButton Sets whether the Print button is available.
ShowRefreshButton Sets whether the Refresh button is available.
ShowTextSearchButton Sets whether the Search button is available.
ShowZoomButton Sets whether the Zoom button is available.

Table 3-4 CrystalReportViewer Methods

Method Description
CloseView() Pass a null value to close the current view. Pass a view name to close a specific view.
DrillDownOnGroup() Drill down on a specific group. See Chapter 12 for details on implementing this method.
ExportReport() Show the Export dialog box.
PrintReport() Show the Print dialog box.
RefreshReport() Refresh the report view. The user will be prompted for the parameters and logon information again.
SearchForText() Pass a string to search for. If found, it returns True and moves to the page that has the string.
ShowFirstPage() Move to the first page of the report.
ShowGroupTree() Shows the Group Tree window. It doesn’t take any parameters. There is no corresponding method to hide it.
ShowLastPage() Move to the last page of the report.
ShowNextPage() Move to the next page of the report.
ShowNthPage() Pass an integer to move to that page number.
ShowPreviousPage() Move to the previous page of the report.
Zoom() Pass an integer to set the zoom level.