Controlling Spacing in a Section

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

Have you thought that you might want to print your report in Double Space mode? Or perhaps add or remove space between lines as the detail rows display? These sound like options you should be able to set when printing a report. In Crystal Reports, however, these are section-controlled options. The Section Expert handles quite a bit in terms of formatting and conditional section options; a combination of Design mode changes and the Section Expert pop-up submenu control line spacing in a report. Take a look at the partial report in Figure 8.15.

click to expand
Figure 8.15. Section spacing

Notice that there is quite a bit of space between the detail data and the group name below it. There is no option in the Section Expert to control line spacing; this is done in Design mode. In Figure 8.16, you can see a double-lined arrow sitting on the section divider at the bottom of the Group Header #1 section. This means that the section divider can be dragged to resize it. Dragging it up so that it fits just under the [Group #1 Name] element will eliminate the extra white space visible in Figure 8.15 below the group name.

click to expand
Figure 8.16. Resizing a section

The quickest and surest way, however, to resize a section to fit the contents without including any extra blank vertical space is to use the Fit Section option from the Section Expert pop-up submenu. Refer back to Figure 8.4 and you’ll see this option in the fifth area. Selecting this option shrinks a section vertically, leaving no extra white space between sections.

The line control options available in the submenu and visible in Figure 8.4 are:

  • Insert Line

  • Delete Last Line

  • Arrange Lines

  • Fit Section

Fit Section removes vertical white space from the bottom of a section. Insert Line adds one line to a section while Delete Last Line removes the bottom-most line from the section. You can use the Insert Line option to create a double-spaced section; you can also drag the section divider down slightly to create more space below the detail record. This forces the next detail record to print with a little space between it and the prior detail record. If the View > Guidelines option is enabled in Design or Preview mode, a guideline is added to the horizontal (left side) margin for each new line added to the section; these guidelines can be used for snap-to-grid purposes. When the last line is deleted from a section, the bottom-most horizontal guideline is removed as well as the line. The Arrange Lines option removes white space between lines rather than from the top or the bottom of the section and evenly spaces the horizontal guidelines.

Selecting All Section Objects

We learned earlier that we can completely hide a section and its contents. We can also use the section container to format an entire section by selecting all the elements it contains it so that global formatting can be applied. This is a new timesaving feature in Crystal Reports 9. To access the option, right-click the gray section label and choose Select All Section Objects (visible in Figure 8.4). This will add selection handles to each of the objects in the section, including text, fields, and graphics, as shown in Figure 8.17.

click to expand
Figure 8.17. Select All Section Objects

Whenever more than one object is selected, right-clicking any of the objects displays a Multiple Selection submenu, as shown in Figure 8.18. Items of the same data type can be formatted using the Format Objects option to open the Format Editor with tabs appropriate to the type of data represented by the selected objects.

click to expand
Figure 8.18. Multiple selection of objects

Warning 

To format multiple objects, they must be the same data type. If the selected objects are not all of the same type, a Multiple Selection submenu will appear but will not have any options that can be selected, and the Format Editor is not accessible.

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