Crystal Report Viewer

book list add book to my bookshelf create a bookmark purchase this book online

mastering crystal reports 9
Chapter 19 - Building Windows Applications with the Report Designer Component
Mastering Crystal Reports 9
by Cate McCoy and Gord Maric
Sybex 2003

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

start example
Private Sub cmdModifyViewer_Click()     CRViewer91.DisplayBackgroundEdge = False     CRViewer91.DisplayTabs = False     CRViewer91.DisplayToolbar = False     CRViewer91.DisplayGroupTree = False End Sub
end example

click to expand
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.

click to expand
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


Mastering Crystal Reports 9
Mastering Crystal Reports 9
ISBN: 0782141730
EAN: 2147483647
Year: 2005
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net