|
Throughout this chapter we have modified the Crystal Report Viewer’s Top, Left, Height, and Width properties in the Form_Resize event so that the Report Viewer will resize with the form in which it is displayed. The Crystal Report Viewer has many methods and properties that allow you to fully control the viewer at runtime. In Listing 19.21 we turn off all the features of the viewer so we can maximize the amount of the report we see in the form, as shown in Figure 19.21.
Listing 19.21: Modifying the Crystal Report Designer
Private Sub cmdModifyViewer_Click() CRViewer91.DisplayBackgroundEdge = False CRViewer91.DisplayTabs = False CRViewer91.DisplayToolbar = False CRViewer91.DisplayGroupTree = False End Sub
Figure 19.21. The customized Crystal Report Viewer
You can also enable and disable viewer functionality by setting properties. For example, to disable printing set the EnablePrintButton property to False:
CRViewer91.EnablePrintButton = False.
Refer to the help file for a full list of methods, properties, and events for the viewer.
The Crystal Report Viewer will also fire events to your VB application like other Windows controls, so you know what users are doing in your application and can fully control it. Figure 19.22 displays the Crystal Viewer events.
Figure 19.22. Report Viewer events
Use of content on this site is expressly subject to the restrictions set forth in the Membership Agreement | |
Conello © 2000-2003 Feedback |