- Crystal report viewer toolbar images how to#
- Crystal report viewer toolbar images full#
- Crystal report viewer toolbar images code#
The following code snippet hides the toolbar.ĬrystalReportViewer1.DisplayToolBar = false You can display or hide the toolbar using this property. The ActiveViewIndex property gets or sets the active view in the viewer and ViewCount returns total number of views in a report. Some of the common properties of CrystalReportViewer are following:Ī page in the report is called a view. Next two buttons are for zooming and search.īy using the properties and methods of CrystalReportViewer, we can customize the default settings of the viewer. The next button is a toggle for grouping if a report has groups. Next button allows you to export reports as to various files such as a pdf, tif, doc, or rtf. Next three buttons are used to close the view, print the report, and refresh the report respectively. The next button can be used to jump to a particular page. The first four buttons on the viewer allow us to move first, previous, next, and last page of the report. The default Crystal Report Viewer looks like the following:
Using the CrystalReportViewer class members, we can customize the behavior of the viewer such as disabling or enabling viewer toolbar buttons, adding custom zoom factor, or moving to different views of the report programmatically.
Crystal report viewer toolbar images how to#
NET to understand how to add a Crystal Report Viewer to a Windows Forms application and how to generate a strongly typed report.Ĭustomizing the Behavior of Crystal Report Viewer See my article Introduction to Crystal Reports in. The following code snippet creates a ReportDocument object, loads a report using the Load method and binds the ReportDocument object to the viewer:Ĭ doc =
Crystal report viewer toolbar images full#
The following code snippet binds a report with hard coded full path of the report to the viewer:ĬrystalReportViewer1.ReportSource = following code snippet binds a strongly typed report to the viewer:ĬrystalReportViewer1.ReportSource = custReport The ReportSource property can be either a full name of the report file, a strongly typed report, or a ReportDocument object. To view a report in the viewer, you simply need to set the ReportSource property of the control. This control is available in the Toolbox and you can simply drag it to a Form to add the control to the form. This class is a user control and can be used as any other user controls.
The CrystalReportViewer class defined in the namespace represents a Crystal Report Viewer for Windows Forms (viewer afterwards). As you can guess from these names, Windows Forms Viewer control is used to view reports in Windows Forms applications and Web Forms Viewer is used to display reports in Web Forms applications. NET provides two report viewers - Windows Forms Viewer and Web Forms Viewer. In this article, I will explore the Crystal Report Viewers and their functionality.Ĭrystal Report Viewers work as a container of a report and allow us to view a crystal report in Windows and Web applications. But it's always a good idea to understand what goes under the hood. NET hides all the details from developers and provides them easy to use user interface so they can concentrate on designing the layouts of the reports. NET and availability of wizards and tools has made writing reports a piece of cake for developers. The integration of Crystal Reports in Visual Studio.