Formatting Sections

Objectives

After completing this lesson, you will be able to:

  • Enhance report display using the Section Expert

Section Expert Overview

Format sections based on your requirements.

The Section Expert offers flexibility when formatting different sections of a report. The three tabs that always appear in the Section Expert are:

  • Common tab

  • Paging tab

  • Color tab

A fourth tab, the Layout tab, appears when you select the details section and the Format with Multiple Columns option on the Common tab.

To open the Section Expert, click Section Expert on the Expert Tools toolbar. You can also right-click on the report and click Section Expert from the shortcut menu.

Exploring the Common Tab

Use the Common tab to set properties such as: visible, keep together, formatting with multiple columns, and so on for a desired section.

The active options on the Common tab vary, depending on which section is selected in the Sections list. Only options applicable to the selected section are available.

Note
The Conditional Formatting button enables you to add a formula that applies a condition to the selected feature. The formula is processed when the condition is met in the report data.

The options in the Common tab are:

Hide (Drill-Down OK)
Hide in the Common tab functions the same way as Hide (Drill-Down OK) on the shortcut menu. It prevents the area/section from printing, but still allows the user to double-click a summary field to open a new display tab to show the underlying data that constitutes that summary value.
Suppress (No Drill-Down)

This option has the same effect as Hide. You may not want to let your viewers drill down on the summary fields to see the information behind them. Or perhaps you do not want people to inadvertently drill down. Choosing Suppress (No Drill-Down) still hides the section, but does not allow anyone to see the underlying data. If a user double-clicks when the magnifying glass appears, the program produces a new tab, but the details do not show. Only the summary field is duplicated. You can also make this feature conditional by clicking the formula button then entering a Boolean formula.

Print at Bottom of Page

This option forces whatever is in that section to be printed as low on the page as possible. In a report that generates invoices, for example, you would want each invoice to have the total printed at the bottom of the page. That way, all invoices have the total printed in the same place, no matter how many entries are on the invoice. This command can be made conditional by clicking the formula button then entering a Boolean formula.

Keep Together

This option prevents page breaks from spreading data from a single record over two pages. Therefore, if you have multiple lines in the Detail section, all the information for each detail line would stay together on one page if you turn the Keep Together option on. This command can be made conditional by clicking the formula button and then entering a Boolean formula.

Suppress Blank Section

This command suppresses or prevents printing of the section if all fields in that section are blank. A typical use is in the creation of a mailing label report where there is no second address line and you do not want a gap to print. This command can be made conditional by clicking the formula button then entering a Boolean formula.

Underlay Following Sections

Underlay allows any objects that are in the section to flow into the next while allowing objects from the next section to print on top of the first. This command can be made conditional by clicking the formula button then entering a Boolean formula.

You might place the company logo in the Page Header and turn on Underlay Following Sections for the Page Header to create a watermark effect. This command is often used with sections containing charts.

Format with Multiple Columns

This option is activated only when the Details section is chosen. This option enables you to create a report that shows the details in columnar format rather than having the details all show one under the other. An example is address labels.

Clamp Page Footer

When this check box is selected, the program removes any extra white space at the bottom of a report. This minimizes unnecessary scrolling for reports viewed online. This option appears only when you have selected Page Footer in the Sections list.

Reserve Minimum Page Footer

This option enables you to minimize the space reserved for your Page Footer sections, thereby maximizing the space available for valuable report information on each page. This option only affects a Page Footer area with multiple sections.

By default, Crystal Reports reserves space at the bottom of each page for your Page Footer sections. This space is reserved whether or not the Page Footer sections are conditionally suppressed. Normally, the space reserved is equivalent to the combined height of all Page Footer sections that are shown or conditionally suppressed.

You can, however, minimize the space reserved. To do so, first conditionally suppress individual Page Footers as desired, select Page Footer in the Sections area of the Section Expert, and then select the Reserve Minimum Page Footer option on the Expert’s Common tab. When you do this, Crystal Reports will only reserve space on each page for the tallest of your Page Footer sections.

This option appears only when you select Page Footer in the Sections list.

Read-only

This option makes a section read-only and locks the formatting and position of all the report objects it contains so they can’t be formatted or moved. When you select this option, all other choices in the Section Expert become inactive. The formatting options that are usually available on the toolbar or shortcut menus are also suppressed for that section.

Relative Positions

This option allows you to lock the relative position of a report object next to a grid object within a section.

  • Only horizontal locking is possible. If you need to preserve relative vertical positioning, you should create a new report section.

  • Once Relative Positions is selected for a section, you can no longer drag objects to new positions within that section. To change an object's position, use the Object Size and Position dialog box.

  • Relative positioning applies only to objects placed to the right of grid objects (that is, objects that can grow horizontally).

Note
  • Only horizontal locking is possible. If you need to preserve relative vertical positioning, you should create a new report section.

  • Once Relative Positions is selected for a section, you can no longer drag objects to new positions within that section. To change an object's position, use the Object Size and Position dialog box.

  • Relative positioning applies only to objects placed to the right of grid objects (that is, objects that can grow horizontally).

The Conditional Formatting button enables you to add a formula that applies a condition to the selected feature. The formula is processed when the condition is met in the report data.

Exploring the Color Tab

Use the Color tab to set the background color for the desired section.

The options in the Color tab are:

Background Color
To add a background color to the selected section, select this check box, then choose a color from the list.
Conditional Formula

Click this button if you want to set up a conditional formatting formula for the corresponding property.

Exploring the Layout Tab

Use the Layout tab to set up your report in a multi-column format. That is, instead of having the data print straight down the page, you can set up multiple columns and have the data flow from column to column. You can also have your data print across then down the page, printing one record in each column, then printing a second record in each column, then a third, and so on. The dialog box is divided into four smaller boxes.

The options in the Layout tab are:

Detail Size
This box enables you to specify the dimensions (height and width) of one detail.

Determine how wide you want each detail to be (based on number of characters, font size, and so on) and enter that value in the Width edit box. Determine how high you want each detail to be (based on number of lines in the detail, font size, and so on) and enter that value in the Height edit box.

Gap between details

This box enables you to specify the empty area (gap, gutter, and so on) you want to allow between details.

  • Horizontal = the gaps between details going across the page.

  • Vertical = the gaps between details going down the page.

Determine the gaps that you want to allow. Enter the horizontal gap in the Horizontal edit box and enter the vertical gap in the Vertical edit box.

Printing direction

The Printing direction box enables you to specify the path the program follows when printing the details on a report page. Your options are:

  • Across then Down

    Prints details across the columns, one detail in the first column, one in the next, one in the next, and so on. Then, when all the columns have a detail, the program moves down the page and prints a second detail in the first column, then in the second, and so on.

  • Down then Across

    Prints details down the first column, then down the second column, and so on.

Format groups with multiple column

Select this check box if you want the program to format groups with multiple columns using the Width, Gap between Details, and Printing Directions specified for the selected section.

Log in to track your progress & complete quizzes