Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

3.18 Drilling Down on Data

Drilling Down on Data

The purpose of creating groups is to organize a lot of data in a report so that the reader can quickly find their data by scanning through the different groups. This lets the reader skip over the data that doesn’t relate to them and instead focus on what is important. But there is more to it than that.

You can use groups to make the report’s data dynamic and allow the user to drill down into the details of each group. Crystal Reports lets you double-click on a group header and open the detail information in a new window. This is called drilling down on data. It lets you see just the data for that group without worrying about the rest of the data on the report. For example, Figure 3-22 shows a report grouped by country.



Figure 3-22. Grouping by country.

Notice how the cursor is positioned on the Australia group header and it is a magnifying glass. The magnifying glass means that you can double click on the group header and it will open a new tab with only its detail information shown. Figure 3-23 shows what happens when you double-click on the group.



Figure 3-23. Drilling down into the Australia group.

Notice that a new tab was created for Australia. Since it has its own tab, you can switch back and forth between the main report and the group data. This tab also brings up another aspect of drilling down on data: it can only be done on the computer. Since it requires double-clicking on the group header, then this isn’t something that can be done with a paper based printout. However, you can print just the data in the drill down tab. This way, you don’t have to print out the whole report if you just want to see the data for a particular group.

One drawback to drilling down on data is that only the data is displayed and no column headers are displayed (see Figure 3-23 above). Thus, if you were to print this out and give it to someone, then they would have to already know what each column represents. Otherwise, they won’t know how to read the numbers on the page. One way to get fix this is to move the column headers from the Report Header section (which isn’t shown in the tab) to the Group Header section so that they get displayed with the drill down data.

Another feature of drill down reports is that the detail sections can be turned off. This lets the user only see the summary data when reading the report. If there is a section that they want to see the details of, then they can double-click on the group header and the detail records are shown on their own tab. This gives you the benefit of creating a report that presents an overview of all the data with the option of only seeing more details when necessary. Figure 3-24 shows the same report modified so that the details are hidden.



Figure 3-24. Group details hidden.

In this report, only the group header and Last Year’s Sales subtotals are shown. The detail records are not visible. To see the detail records, double-click on the group header just like before and they will be displayed in a separate tab.

The group details can also be suppressed so that they can’t be viewed by anyone. This is beneficial when you want to distribute a report that has classified information in it but you don’t want to recreate the report from scratch just to hide the data. For example, you can give a manager a travel expense report that shows the total expenses and how much was charged by each employee. You can also give this same report to others in the department to see the totals but hide the detail amounts.

Hiding and suppressing data can be done in two different ways. The easiest way is to use the pop-up menu by right-clicking the section in the gray area on the left side of the report designer. The pop-up menu has the items for toggling the Hide and Suppress properties of the section. Click on the menu item to either enable or disable the property. The other way to set the properties is to select the Section Expert menu item from the pop-up menu and modify it via the dialog box.