Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

6.08 Suppressing Blank Sections, Underlaying Following Sections

Suppressing Blank Sections

Printing sections that don’t have any data leaves blank rows in the report. This makes a report look unprofessional because of the gaps that seem to randomly occur. To fix this, set the option Suppress Blank Section. The report skips over any sections that don’t have any data and goes to the next record. This option is used most frequently in conjunction with creating multiple report sections. This is covered in section Adding Multiple Sections.

Underlaying the Following Sections

When formatting a section so that it underlays the following sections, the following sections print on top of it. This has the effect of superimposing one or more sections on top of another section.

Underlaying sections is useful when working with images or charts and the related information is printed beside the image. This concept might be tough to grasp at first, so let’s look at two examples. The first example is an employee report which shows the employee’s picture on the left and the employee detail listed next to it. The example in Figure 6-5 is from the Xtreme database.



Figure 6-5. Employee Profile report with photo.

The data listed next to the employee picture is from the Employee table. It shows the different fields from a single employee record. There is a one-to-one relationship between the employee photo and the employee data.

This example is limited in that the photo can only be printed next to the data within a single employee record. If you wanted to print a photo with multiple detail records next to it, this approach wouldn’t work. The next example shows how to fix this problem by underlaying sections.

Let’s look at an inventory report which lists how many products are on-hand for each inventory item. These items are grouped together by category and a generic picture of each category is displayed.



Figure 6-6. The Inventory report with pictures for each category.

To create this report, put the photo in the group header on the left most portion of the page. Put the detail fields in the detail section and make sure that all the fields are to the right of the picture. Lastly, turn on the Underlay format option for the group header.



Figure 6-7. Inventory report with Underlay turned on.

This causes all the group’s detail records to be printed on top of the group header. Since the image and the records aren’t on the same part of the page, this gives the effect of printing multiple detail records beside a single image.

Printing a Watermark

Using the underlay feature is also useful when you want your report to have a watermark image on each page. Put the image in the page header and set the Underlay option on. Everything after the header is printed on top of it. Be sure to test the image to make sure it isn’t too dark. A faint image works best as a watermark because it allows the rest of the report to be easily read.