Adding, Resizing and Moving Report Objects
The objects on a report work the same as the controls on a form. The objects that are listed in the toolbox can be added to the report by dragging and dropping them onto the proper section of the report. You can also double-click on them and they will be automatically added to the section that has the focus (its header bar will be blue while the other header bars will be gray). If you have an existing control that you want to reuse and it has already been formatted, then you can highlight it and copy and paste it. This creates a copy that is attached to your pointer and will move around as you move your mouse. When you have it positioned properly, click the mouse button to drop it there. You can also select multiple objects for copy and paste.
Selecting multiple objects is done by holding down the control or shift key and clicking on the individual controls. You can also draw a temporary window on the report and any controls that are included in the window get selected. Do this by holding down the mouse button and moving the mouse to enlarge the box. Let go of the mouse when the box is complete and the objects will be selected.
There is a strange behavior to be aware of when selecting multiple objects using the window technique. You can’t draw a window if another object is already selected. You have to first click anywhere on the report to unselect the current object and then you can draw the box. For example, assume that you selected a textbox object. You then decide that you really wanted to select multiple textboxes so you click elsewhere on the report and attempt to draw a window. Unfortunately, nothing will happen. It only results in the textbox getting unselected. You need to click the mouse again to start drawing the window.
You can only select multiple objects when they are compatible. For example, the box and line objects can be selected together, but the box object can’t be selected with the text object.
Resizing a control is done by selecting it to give it the focus. Position the mouse over the sizing handles on any side and drag them. When resizing multiple objects, the sizing handle will only appear on the last control selected. As you resize the last control, its new size changes as you move your mouse. The other controls will not change until you release the mouse button. An option for resizing objects is to let Crystal adjust their size to be the same for each one. After selecting all the objects, right-click on one and select the Size menu option. From there you can choose Same Width, Same Height, or Same Size.
When moving objects on the report, it can be helpful to display the grid lines. This makes it easier to line up objects with each other. You have the option of making the objects snap to the grid lines. This means that when you move a control, its edge must be placed on a grid line. It can’t be placed between grid lines. When you release the mouse, the object will automatically snap to the nearest grid line. Turning grid lines feature and the snap-to feature on and off is controlled by changing the designer properties. Right click on the report and select Design/Default Settings.
An easy way to align multiple objects is to use the Align menu option. After selecting the objects, right-click on one of them and select Align. The options to choose from are Tops, Middles, Bottoms, Baseline, Lefts, Centers, Rights, and ToGrid. Each of these options aligns multiple objects to a single object. The object that is used as the basis for alignment is the last object selected. You can identify the last object selected by seeing which one has the sizing handles on it.