Drilling Down on Data
Grouping data on a report gives you the added feature of letting you create drill-down reports. A drill-down report lets the user look at the detail records that make up a summary value. It takes a snapshot of the detail records that make up the summary and displays that snapshot on a separate tab. This lets the user look at the detail data without being distracted by the rest of the report.
Drill-down reports never change their original format. As you double-click on the group data to drill down into the detail data, new tabs are created to show you that detail. But the original report format stays the same. If the original report is already showing the group’s detail, you can still double-click on it to open the detail in another tab on the viewer.
Since drill-down reports are designed with the purpose of having a user navigate through the data, they can only be used with the CrystalReportViewer control. Obviously, this wouldn’t work on a report that has been printed because paper doesn’t have a user interface.
The viewer shows you which groups can be drilled down into by changing the cursor into a magnifying glass as it passes over the group data. Perform the drill-down by double-clicking on the field.
By default, the group details are shown on a report and the drill-down feature is also turned on for every group. This just means that the details will be shown on the report and the user can click on the group header to display the details in a separate tab. If you want to hide the details, but still allow someone to drill-down into the details, right-click on the report and select Hide. If you don’t want the details viewed at all, select Suppress.
An advanced example is a report that has secure data that can only be viewed by the appropriate level of personnel (e.g. an employee payroll report), but you want all other users to be able to view the group summary data. To implement this behavior, modify the group’s object during runtime to either turn Suppress on or off depending upon the user. Modifying the group objects during runtime is covered in Part II of this book.