The Result Data Newsletter   
Volume 801 - January 2008   
© Copyright 2007 Result Data Consulting, Ltd.  614-505-0770  www.resultdata.com   

    Result Data Home Page  |  Newsletter Archive  |  Upcoming Events  |  Classes & Workshops  |  Request Information
Upcoming Events:  Mid-Ohio BusinessObjects User Group:  2/6, SharePoint Seminar:  2/20

Return to Newsletter Contents...

Crystal Reports XIR2 - Working with Sections

by: Tom Hinkle, BI Consultant, CRCP

Crystal Reports organizes the report into sections when it is created.  Using these sections effectively can produce a very professional looking and performance optimized report.

About sections

Crystal Reports provides five design areas to use when building your report:

  • Report Header
  • Page Header
  • Details
  • Report Footer
  • Page Footer

Each area contains a single section when you first create a new report. You cannot delete any of these original sections but you can hide them or add to them. Once you have added sections, you can delete them, move them in relation to other similar sections, or merge related sections together.

Working with sections

Many of the procedures in this article show you how to work with sections in the Section Expert. Sections can also be inserted, deleted, and so on by right-clicking the shaded area to the left of the section in the Design or Preview tabs and choosing the appropriate option from the shortcut menu.

Inserting or deleting a section

  1. Click Section Expert on the Expert Tools toolbar

  1. Highlight the section you want to insert a section after or delete

  1. Click Insert or delete

Moving a section (once you have created a multiple of one of the original five sections)

  1. Click the Section Expert on the Expert Tools toolbar

  1. Highlight the section you want to move

  1. Click the Up or Down arrow to move the section

Note:

  • You can only move a section up or down within an area

  • The letters that identify the sections describe their relative (as opposed to original) position Thus, if you move a "C" section up, it becomes a "B" section. It loses its original "C" designation
  • You can also move sections by dragging and dropping them in the Report Designer

Merging two related sections

  1. Click Section Expert on the Expert Tools toolbar
  1. Move the sections so the two sections you want to merge follow each other in the list
  1. Highlight the top section
  1. With Section (B) highlighted, click Merge and Section (C) will be merged with Section (B) to form one section
  1. Rearrange the objects as needed

Splitting and resizing sections

A section can be split into two or more sections and/or resized easily in the Design tab:

Splitting a section

  1. Move the pointer over the left boundary of the section you want to split
  1. When the pointer becomes a Section Splitting cursor, click the boundary and drag the pointer into the section
  1. When a horizontal line appears, drag it up or down to split the section the way you want it

Resizing a section

  1. Move the pointer over the bottom boundary of the section you want to resize

  1. When the pointer becomes a Resizing cursor, drag the boundary to make the section bigger or smaller as you wish

Using multiple sections in reports

Certain reporting tasks are performed most efficiently by creating multiple sections within an area, such as:

  • Keeping variable length objects from overwriting each other
  • Eliminating blank lines when fields are empty
  • Adding blank lines under specific conditions

Keeping variable length objects from overwriting each other

When  variable length objects are placed above other objects in one section of the report while the Can Grow option for the variable length object is toggled on in the Format Editor, that object may overprint objects positioned directly below it unless you have:

  • Expanded the section to fit the maximum size of the object
  • Spaced the objects, allowing enough space for the first object to complete printing before the second one begins

You can eliminate this overprinting problem by creating multiple sections in an area and placing objects below the variable length object in their own section(s).

Eliminating blank lines when fields are empty

  1. In the Section expert, highlight the section

  2. On the Common tab, select the Suppress Blank Section check box

Note: If the report section you want to suppress contains a blank subreport, use the Suppress Blank Subreport option, found on the Subreport tab of the Format Editor, as well as the Suppress Blank Section option.

Adding blank lines conditionally

Use multiple sections to print a blank line on your report under specific conditions. For example, you may want to insert a blank line after every fifth record in the report.

To add blank lines conditionally

  1. Use the Section Expert to create two Details sections.
  1. Place the report detail data in the top section.
  1. Leave the second section empty.
  1. In the Section expert, highlight the second section.
  1. On the Common tab, select the Suppress (No Drill-Down) check box then click the conditional formatting button to its right.
  1. Enter the following formula in the Format Formula Editor:

          Remainder (RecordNumber,5) <> 0

This formula divides each record number by 5. If the division produces a remainder, it suppresses the blank section. But if the division produces no remainder, a zero (which it will for every fifth record printed), the program prints the second section, thus inserting a blank line.

 

Go to Top  |  Return to Newsletter Contents

The Result Data Newsletter is published approximately once a month to share the latest information on business intelligence, data management and CRM. There should be a link below to allow you to change or remove yourself from our list. We take your requests very seriously. If you have any difficulty please contact us at 614-505-0770 and we will make sure that your request is handled properly. This is not intended to be an unsolicited message and you can reach us in person if needed.

© Copyright 2007 Result Data Consulting, Ltd. - All Rights Reserved
All trademarks and copyrights are the property of their respective owners. This information is provided without warranty.
Announcements
Quarter 1 Training Special
Schedule and attend any public training class now through March 31st and receive 10% off the normal class price OR opt for a gift certificate to the Apple Store for that same dollar amount. Restrictions apply and you must mention the promotional code Apple08 at the time of registration to receive the promotion.  Call 614-505-0770 for further details and restrictions.
Next Mid-Ohio BusinessObjects User Group Meeting
The next MOBOUG is Feb. 6, 2008.  Call 614-505-0770 or click here to reserve your seat.
Attend the First Microsoft SharePoint Seminar
The first free Microsoft SharePoint Seminar is on Feb. 20, 2008.  Call 614-505-0770 or click here to reserve your seat.
Looking for a Few Good Men and Women
Join our award winning team of Business Intelligence consultants and .Net Software developers.
Send your resume and salary requirements to:
jobs@resultdata.com