Partager via


Selecting, Moving, and Resizing Report Controls

If you created a report layout that already has controls on it, you can change their placement and size on the report. You can change each control individually or you can select a group of them and treat them as one unit.

To move a control

  • Select the control and drag it to a new position in a report band.

    The control moves by increments into position within the layout. The increments are based on the grid settings. To override the grid, press the CTRL key while you drag the control.

To select multiple controls

  • Drag to draw a selection box around the controls.

    Selection handles appear around each control. While they are selected, you can move, copy, or delete them as a group.

You can associate a group of controls together for more than just the current task by identifying them as a group. For example, you might want to associate a label control and a field control with each other so you can move them without selecting them separately. This feature is also useful after you have formatted and aligned the controls because it preserves their positions with respect to one another.

To group controls together

  1. Select the controls you want to treat as a group.

  2. From the Format menu, choose Group.

    The selection handles move to the outside of the entire group. You can treat the group of controls as a single unit.

To ungroup a group of controls

  1. Select the group of controls.

  2. From the Format menu, choose Ungroup.

    The selection handles appear around each of the controls that were in the group.

Once a control is on your layout, you can change its size individually or you can resize a group of controls to match each other. You can resize any report control except labels; their size is determined by the text, font, and point size.

To resize a control

  • Select the control, then drag one of the selection handles to the desired size.

To match the size of multiple controls

  1. Select the controls you want to have the same size.

  2. From the Format menu, choose Size.

  3. Choose the appropriate option to match the width, height, or size.

    The controls resize to match the option you selected.

Aligning Controls

You can align controls in relationship to each other or you can place them according to the grid provided by the Report Designer. You can align the controls with a particular side or with the center.

To align controls with each other

  1. Select the controls you want to align.
  2. From the Format menu, choose Align.
  3. From the submenu, choose the appropriate alignment option. Visual FoxPro uses the control whose edge is the closest to the direction you selected to align as the anchor.

To align controls manually

  • From the Format menu, clear Snap to Grid.

You can also align controls using the Layout toolbar. Using the toolbar, you can align with the control farthest from the side you select by holding the CTRL key down while clicking the alignment button.

Align the controls with an edge that all of the selected controls have open and away from each other. Controls that are in a row and are selected to align with their right side, or left side, will pile on top of each other. Likewise, controls that are in a vertical line and selected to align with their top, bottom, will overlap.

To center controls within a band

  1. Select the controls you want to align.

  2. From the Format menu, choose Align.

  3. From the submenu, choose Center Vertically or Center Horizontally.

    The controls move to the vertical or horizontal center of their respective band.

Control Placement with the Status Bar or Grid

You can place a control in a specific position on the report page by using the status bar or the grid. By default, controls snap into position according to the grid. You can choose to turn off the snap feature and to show or hide the grid lines. Grid lines can help you in positioning controls on the layout.

To place a control at a specific position

  1. From the View menu, choose Show Position.
  2. Select the control, then move the control into place using the position information on the status bar.

To display grid lines

  • From the View menu, choose Grid Lines.

    A grid appears in the report bands.

To change the measurements of the grid

  1. From the Format menu, choose Set Grid Scale.
  2. In the Set Grid Scale dialog box, enter the number of pixels for the horizontal width and vertical height of each square in the grid.

See Also

Adding a General Field | Defining Report Variables | Using Expressions and Functions in Field Controls | Adding Reports and Labels | Integrating Queries and Reports