Hiding Sections

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

mastering crystal reports 9
Chapter 8 - Customizing Sections
Mastering Crystal Reports 9
by Cate McCoy and Gord Maric
Sybex 2003

To the left of a section’s design layout is the section’s name or abbreviation. Right-clicking this area displays the submenu for sections, shown in Figure 8.4. From here, you can choose to unilaterally hide or display an entire section and all the information it contains.

click to expand
Figure 8.4. Section submenu

Tip 

The first option in a submenu is always the name of the report object that currently has focus.

The Don’t Suppress option displays a hidden section, making it visible and eliminating the gray hatch marks on the section’s background. The opposite of Don’t Suppress is Suppress (No Drill-Down). Only one of these two options will ever appear on the submenu; click the option to change the behavior and the next time you view the pop-up submenu, the opposite action is listed.

Tip 

If you need more room for your design, try using the short section abbreviations (RH, PH, D, RF, PF) by choosing the Show Short Section Names option in the menu shown in Figure 8.4.

Drill-Down Sections

User-controlled section hiding is called drill-down, and its purpose is to hide detail data until the user asks to see it. Notice the Hide (Drill-Down OK) menu option directly above the Don’t Suppress option in Figure 8.4. There are two ways to prevent an entire section of information from displaying:

  • Hide it but allow drill-down into detail information.

  • Suppress it completely and do not allow drill-down.

Both options hide the section and its contents. The difference between the two is that the person viewing the report can display a section at runtime using the first option, while with the second option the user never sees the section.

Drill-down is frequently used with group sections and detail data; the detail data section is hidden with drill-down capability, and all that is visible when the report opens is the summary information in the group section. For instance, in our example, we have a report that lists resorts by country. A simplified list would show just the country names, and if you wanted to see which resorts were in that country, you could expand the section to display the detail information. A double-click (a drill-down) on a summary item in the group section displays the detail data.

The net effect of the hiding in this case is to initially hide the data but still make it available interactively on demand when a user wants to view it. This type of report conserves real estate when the report first opens. As the user moves the mouse over a hidden drill-down-capable section, the mouse cursor changes into a magnifying glass. This signals that a double-click can be used to reveal detail data. Figure 8.5 shows a list of resorts by country, and the magnifying glass is visible when the mouse is over the top of the country name.


Figure 8.5. Drill-down sections

When the user double-clicks the summary line, the detail information for that particular summary item is displayed in its own tab in the Crystal Reports designer, as shown in Figure 8.6. The group tree also displays with only the single entry in the new tab. In the original Preview tab, the group tree still contains an entry for all groups in the report. The drill-down section can be closed by clicking the X on the tab.

click to expand
Figure 8.6. Drill-down tabs

Section Names

Notice in the gray label area for the section in Figure 8.6 that only a single detail section (D) and its group header (GH1) and group footer (GF1) are being displayed. These are the abbreviated section names. In Design mode, you can choose to show just these short names using the option Show Short Section Names from the section pop-up submenu. This option is visible in Figure 8.4. In Preview mode, you can choose to prevent all section labels from displaying by disabling the Section Names option in the Preview section of the report’s options. Refer back to Figure 8.3, where the option is enabled; you could click the option to disable it and prevent the section short names from displaying in Preview mode. You control the displaying of section names in Preview mode independently of the settings in Design mode.

Conditionally Hiding Sections

The options to hide and suppress sections using the pop-up menu for sections hide the section entirely. Drill-down allows the person viewing the report to display the section. There is one more way to hide sections and that is conditionally, meaning that if certain conditions are true, the section will not be displayed. To conditionally hide sections, you’ll use the Section Expert with a formula to control when the section displays.

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