Tutorial: Customizing the CrystalReportViewer Control: Introduction

In this tutorial, you learn how to customize the look of the CrystalReportViewer control through use of the properties from its underlying class.

You also learn how to use the methods for page selection, zoom, search, and print.

To begin, you learn how to customize the CrystalReportViewer toolbar. You need a ListBox that stores the properties that are available for the toolbar. Only the properties selected from the ListBox control are displayed on the CrystalReportViewer toolbar.

Then, you add a second ListBox to store the elements for the report. For a Web Site, you also choose to display all the report pages as a single page or as separate pages.

You learn how to customize the background color through a DropDownList control.

Next, you learn how to select the report page that you want to view. You need a TextBox control to enter the page number, and a Button control to reload the report to your selected page. You also need a TextBox and a Button control to modify the zoom factor and to search for text in your report.

For a Web Site, you have access to properties of the CrystalReportViewer control that are not available in a Windows project: one property to choose the print mode and other properties to change the width, style, and color of borders.