Using Multiple Sections in Crystal Reports

When “laying out” data in Crystal Reports, we usually think of written information. Graphics such as charts do enter into reports, but we don’t always use photographs or other non-data images, especially in the Details section where the data will go.

If, for example, we wanted a graphic (division logo, photograph, etc.) at the beginning of each batch of data, and the data to follow, it’s easy—put the graphic in a group header. But what if we want the graphic next to the data in the Details section? We can still use group headers, but how do we “force” the data and the graphic to sit next to each other? There doesn’t seem to be any text-wrapping feature like the ones in word processors or desktop-publishing programs.

It turns out there’s a loophole. We can create additional sections—for instance, a second header section—right under the original, and end up with group headers  A, B, and so on. Normally we don’t need more than a few, but even two can suffice. Then, we can literally slide the next section(s) under the first (or second), to simulate text wrap.

Start with the normal layout. We’ve got a report partly built; the group header section gets the usual setup of labels.

Basic Layout

We can put the graphic there, in the group header.

Graphic Placed

Then, the trick. Right-click the name of the section you want to use, and click “Insert Section Below”. This creates (in our example) a second group header.

Popup Menu

Now we can move the graphic down into it and resize the first one. Then, bring up the Section Expert for that second header, and in the Common tab, check the Underlay Following Sections checkbox, and OK it.

Section Expert

There you have it.

Completed Mod

Text wrap, as such, doesn’t exist within Crystal Reports. Though fields, text boxes, graphics, etc. are all objects and do follow some of the rules we run into in DTP programs (where everything is in a box and “object-oriented layout” is the overarching principle), Crystal simply isn’t a DTP program, nor a word processor. So we have to have workarounds for some things those other kinds of programs can do much more straightforwardly. Luckily, the CR design team accounted for this. It’s just a matter of knowing the recipe.

Leave a Reply

Your email address will not be published. Required fields are marked *