Setting the Position and Size of Objects

Objective

After completing this lesson, you will be able to Rearrange objects in a report.

Object Positioning with Guidelines

If you want to line objects up with one another, you can insert a guideline and attach the objects to it. Then, in one step, you can move the guideline to reposition all the objects attached to the guideline.

Crystal Reports automatically places a vertical marker in the ruler for each field that you place in the Details area. These markers or "handles" let you move the fields and their column headings horizontally on your report at the same time by moving the guideline arrowhead.

Hint

Guidelines can be visible in both the Design and/or Preview tabs if you have Guidelines enabled for Design View and/or Preview in the Layout tab under Options. The guideline handles will not appear in the Preview tab unless you select an object on the report.

Once you've snapped one or more objects to a guideline, you can move all the objects at once by moving the guideline. To move the guideline, drag its arrowhead along the ruler. Removing the arrowhead off the ruler will remove the guideline.

To remove all guidelines, right-click the ruler and select Remove All Vertical Guidelines or Remove All Horizontal Guidelines from the shortcut menu.

Play the following video to see how to use guidelines and other methods of moving and sizing objects.

Caution

You can have as many guidelines as you want, but beware of "guideline clutter." If you find yourself with many guidelines on your report, objects can be attached at both ends. In this case, if you move a guideline, any object attached to it will be stretched because the other side is anchored by the other guideline.

Object Movement

You need to select an object before you can move or re-size it.

In the Design tab, you can select lines and boxes with other objects such as text, fields, charts, maps, OLAP grids, cross-tabs, and OLE objects.

In the Design and Preview tabs, you can select multiple objects such as text, fields, charts, maps, OLAP grids, cross-tabs, and OLE objects.

Some of the operations deal with the concept of the main object, the last object you select. Certain limitations apply in certain operations:

If the new location of a multiple objects selection does not accommodate all the selected objects, then the main object and those that can be accommodated will be moved. The other objects will remain in their original locations. However, if the new location does not accommodate the main object, then no object will be moved.

When you placed your fields into the Details area, the fields were attached to guidelines. You can move all fields attached to a guideline by grabbing the guideline arrowhead and moving it to a new position.

To select multiple objects, CTRL click each object in succession.

Once you have selected all desired objects, release the CTRL key, and then click and hold on any of the selected objects. The four-way cursor appears as you drag the objects to a new position.

An alternate way to select multiple objects is by using a marquee or lasso around the objects.

Hint

You can also right-click the section and choose Select All Section Objects from the shortcut menu.

Object Alignment

The main object is the object that you want to align other objects with. To make an object the main object, select after a multiple object selection. You can align selected multiple objects based on the position of the main object:

  • Tops, Middles, Bottoms

  • Baseline

  • Lefts, Centers, Rights

  • To Grid (Snap to Grid)

You can change the main object by right-clicking a new object.

Some of the operations deal with the concept of the main object, the last object you select. Certain limitations apply in certain operations:

You can select multiple objects in the same section or different sections of a report and align them, with the condition that the alignment will not result in an object being moved to a different section of the report. For example, if you select an object in the Report Header and another object in the Page Header, you can align them vertically but not horizontally because moving objects horizontally would result in moving one of the objects to a different section.

Log in to track your progress & complete quizzes