|
Mastering Business Analysis with Crystal Reports 9 Authors: Tull C Published year: 2004 Pages: 34-36/177 |
In report writing, groups are a common relationship among records. For example, you could group all customers by state. The organization of your report might then list all states, followed by the customers within those states.
Crystal Reports offers a great deal of flexibility in how you can group data within a report. You'll learn more about grouping data in Chapter 8.
For now, let's create a group based on an employee's last name . To get an idea of how groups work, especially using the wizards, perform the following steps:
Make sure that you're in the Grouping screen.
Select the Last Name field, and press the Add button.
The result is shown in Figure 4-8.
Figure 4-8:
The Grouping screen (of the Standard Wizard)
| Tip |
When selecting a field as your group, you may notice that you can select the same field from the Report Field node or the Employee Table node. The difference between these two nodes is that the Report Field node contains the fields you selected for your report. The Employee Table node, in comparison, contains all available fields from that database table. You can use either option for grouping your reports. However, it's usually best to group using data you've selected for your report (available from the Report Field node). |
After you've selected a field to which you'll group data, press the Next button.
A Summaries screen displays.
In report development, a summary is a count of all values within a group of records. From this count, a single value is tallied. Summaries are useful and powerful tools, especially in financial reports such as general ledgers or balance sheets.
In the Summaries screen, you can select fields for which to create summary totals. The Summaries screen (see Figure 4-9) is available only if you've specified a group in the Grouping screen.
Figure 4-9:
The Summaries screen (of the Standard Wizard)
| Tip |
Summary totals are also referred to as subtotals. The two terms are often used interchangeably. |
Creating a summary field is one of those optional steps with the Report Wizards. Don't worry about creating any summary fields for now; we learn more about them in Chapter 9. Press the Next button to continue through the wizard.
| Tip |
When working through the screens within a Report Wizard, realize that you don't have to select information for every screen. Some of these screens contain the word Optional enclosed in parentheses. You can skip through optional screens by pressing the Next button (located at the bottom of each screen). |
The Record Selection screen allows you to filter the fields that you selected earlier from the Fields screen. Record selection refers to the process of choosing the records to display within a report. In other words, record selection is a filtering process; you can have all records within a table display, or you can create a filter so that only a particular type of record displays.
For example, say you only want employee records from the Sales department to display within your report. Although an employee table contains employees from every department, a record selection statement will allow only employees from sales to display within your report. We discuss record selection further in Chapter 7.
The Record Selection screen allows you to control the records that your report should (or should not) display. Figure 4-10 (on the following page) displays the Record Selection screen.
Figure 4-10:
The Record Selection screen (of the Standard Wizard)
You don't have to select records in this step; you can always filter your database fields after you're in the Report Design area. For now, just press the Next button.
| Note |
By not specifying any filters, you're stating that all records within your selected fields should display. |
|
Mastering Business Analysis with Crystal Reports 9 Authors: Tull C Published year: 2004 Pages: 34-36/177 |