|
|
![]() | |
|
|
|
To access the contents, click the chapter and section titles.
Peter Norton's Guide to Visual Basic 6
Using the Design WindowThe Design window (see Figure 14.2) is separated into two sections that provide onscreen information which helps you design a report. The large white area of the Design window is the Edit box. This is where you design and format your report. The horizontal lines in the Edit box separate the report into several sections. As you add new data groups to your report, more sections appear in the Edit box. The gray area to the left of the Edit box displays additional information to assist you in placing the data and other objects on the report. The horizontal lines extend into the gray area, identifying which section is which.
Several common features are incorporated into Crystal Reports that you have probably used in other applications. These include a ruler that can be displayed to assist in the placement of data on the form and a Snap-to-Grid feature like the one in the Visual Basic development environment, which assists in lining up objects on the report. Crystal Reports functions and features are accessed via the toolbar at the top of the main window, the main menu, or by using the pop-up menus directly on the report. Crystal Reports also provides wizards to help you add the following objects to the report:
The right-click pop-up menus provide access to a selected objects related functions. Some of these options are as follows:
After you select your database, the Design window is displayed to enable you to insert and format the data you need in your report. When you start a new report, the five sections listed in Table 14.1 are created automatically in the Design window.
You build reports by inserting data fields, formulas, and other information into the Details section of the Design window. You use the Insert menu to select or build the fields you want to insert on the report. You add subtotals and other group values by selecting a field and then building the conditions to generate the new subtotal or group value. These group sections are created as needed, and the values are placed in the associated group section. If you want the value to be some place else on the report, you simply select it and drag it there. Using the Preview WindowYou can see how your report will look when it is displayed or printed by switching to the Preview window. Whenever you select this tab, Crystal Reports retrieves the data from the database, performs any defined calculations, and then displays the report (see Figure 14.3). After the data is displayed, you can review the positioning and formatting of all the information on the report. Additionally, you can see the results of all summaries, calculations, and filters. In effect, this is what the final report looks like.
While on the Preview window, you can still modify the format of your report without having to return to the Design window. The Preview window does have a different look and feel than the Design window. Each field in the database can contain hundreds of values, depending on the number of records in the database. When you place a field in the report on the Design window, a single field box is displayed that represents all those values. When you select this field, sizing handles appear, and the border changes color (see Figure 14.4).
On the Preview tab, you are working with the actual data. Instead of a box with 9s or Xs in it, the data values are displayed. When you select a field, a sizing box appears around every value from the selected field. Despite the difference in look and feel, the process of building and modifying the report is the same in both windows. Working with the Crystal Reports WizardsCrystal Reports contains several wizards you can use when creating reports. When you start a new report by choosing File, New, the Create New Report dialog box is displayed as shown in Figure 14.5.
The series of buttons in the Create New Report dialog box represents the different report wizards from which you can choose. Each wizard takes you through the steps required to create that style of report. If you want to build a new report based on an existing one, click the Another Report button. The program will make a duplicate of the original report that you can modify as needed to create the new report. If you want to build a report from scratch, click the Custom button. Several Report Type and Data Type buttons appear at the bottom of the Create New Report dialog box (see Figure 14.6).
|
|||||||||||||||||||||||||||
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. |