Aligning Fields and Text in Headings and Footings

In this section:

How to:

Reference:

The alignment grid aligns fields and text within report headings and footings with precision. You can align text and fields in all types of headings and footings (report heading/footing, page heading/footing, and subheading/subfooting).

Alignment grid is supported for reports in HTML, PDF, Excel 2000, and Excel 2007 output formats.

The alignment grid appears as a dotted grid line around each individual item in a heading or footing and shows how these items actually appear in your report output. Using the alignment grid and Alignment Properties, you can justify items, select item width, select decimal alignment, and add and remove items. Items refer to the cells in the grid.

The following image shows a portion of Report Painter with a report that has alignment grids in the Page Heading and Subheadings.


Top of page

x
Procedure: How to Align Items Using the Alignment Grid
  1. Click in the heading or footing where you want to add alignment.
  2. Click Alignment Grid from the Properties menu. If you:
    • Have items (text or fields) in your heading or footing, a grid appears around each of the items in your heading or footing. Skip to Step 4.
    • Do not have items in your heading or footing, the Insert Alignment Grid dialog box opens.
  3. Select the number of lines, the number of items per line, the default item width, and the justification or decimal alignment, and click OK.

    Note: You can change these properties at any time.

  4. Right-click an item in the heading or footing and select from the alignment options. Options include Grid Options, Cell Options, Clear, Select All, Delete All, Insert, Delete, Alignment Properties, and Merge.

    Note: For a complete description of alignment options, see Alignment Grid Options.

  5. Right-click an item in the heading or footing and select Alignment Properties. You can set the following properties for each item in a heading or footing:
    • Item width. You can also adjust the item width by dragging the vertical cell wall with your mouse.
    • Justification.
    • Decimal alignment.
  6. Click OK.

Top of page

x
Procedure: How to Align an Embedded Field in a Heading or Footing

To align an embedded field in a heading or a footing:

  1. Double-click the embedded field in the page heading, page footing, subheading, or subfooting to highlight it.
  2. Right-click the highlighted embedded field and select Alignment Grid.

    The alignment grid appears as a dotted grid line around each individual item in the heading or footing.

    Note: A tooltip appears when the mouse is hovered over the embedded value.

  3. Click anywhere in the alignment grid and select Alignment Properties from the Properties menu.

    The Alignment Properties dialog box opens.

  4. Style the embedded field with the alignment grid options. For more information, see Alignment Grid Options.

Top of page

x
Procedure: How to Edit or Add Items in an Alignment Grid

Top of page

x
Procedure: How to Move or Copy Items in an Alignment Grid

You can move or copy an item using your mouse or keyboard.

To move or copy an item using your mouse:

  1. Select the item(s) and place your mouse anywhere on the black border. The cursor changes to a four-way arrow.
  2. Click and drag the items to move the selected items.
  3. Hold down the Ctrl key and click and drag to copy the selected items.
  4. Right-click and drag presents you with the option of moving, copying, or canceling.

To move or copy an item using the keyboard:

  1. Select the item (you see a black border around the item or items when they are selected).
  2. Copy selected items using the Ctrl+C (copy) and Ctrl+V (paste) keys on your keyboard.
  3. Move items using the Ctrl+X (cut) and Ctrl+V (paste) keys on your keyboard.

Note: Only contiguous selections of items can be moved or copied.


Top of page

x
Procedure: How to Delete Items From an Alignment Grid

To delete:


Top of page

x
Reference: Shortcut Keys for Alignment Grid

The following shortcut keys are supported when using the Alignment Grid. The first column provides the action and the second column provides the key combination.

Action

Key Combination

Undo

Ctrl+Z

Redo

Ctrl+Y

Cut

Ctrl+X

Copy

Ctrl+C

Paste

Ctrl+V

Select All

Ctrl+A



x
Reference: Usage Notes for Alignment Grid

The following apply when using the alignment grid in Report Painter:


Top of page

x
Reference: Alignment Grid Options

When the alignment grid is enabled in Report Painter, additional alignment grid options are accessible from the Properties menu or from the right-click context menu in Report Painter. The alignment grid options include Grid Options, Cell Options, Alignment Properties, and Merge options.

To enable the alignment grid, click Alignment Grid from the Properties menu or select Alignment Grid from the right-click context menu within a heading or footing. The alignment grid appears as a dotted grid line around each individual item in a heading or footing.

The following image shows the alignment grid options from the Properties menu in Report Painter.

Alignment grid options from the Properties menu

The following image shows the same alignment grid options from the right-click context menu of a heading or footing.

Right-click context menu options for alignment grid

The following alignment grid options are available:

Grid Options

Opens the Properties dialog box for the heading or footing at the Style tab.

Note: Although the alignment grid is supported for reports in HTML, PDF, Excel 2000, and Excel 2007 output formats, Grid Options may vary depending on the report output.

Cell Options

Opens the Properties dialog box for the heading or footing at the Style tab.

Note: Although the alignment grid is supported for reports in HTML and PDF output formats, Cell Options may vary depending on the report output.

Clear

Select from the Clear submenu to clear formats or contents for the item in the alignment grid.

  • Clear Formats removes all formatting and styling for the item.
  • Clear Contents deletes all text and fields within the item.
Select All

Selects all items in the grid.

Delete All

Deletes all items and removes the alignment grid.

Insert

Select from the Insert submenu to insert items and lines in the alignment grid.

  • Insert Item to the Left inserts a new item to the left of the current item.
  • Insert Item to the Right inserts a new item to the right of the current item.
  • Insert Line Above inserts a grid line above the current item, using the same format and number of items as the current line.
  • Insert Line Below inserts a grid line below the current item, using the same format and number of items as the current line.
Delete

Select from the Delete submenu to delete items and lines in the alignment grid.

  • Delete Item deletes the selected items.
  • Delete Line deletes the entire line associated with the current item(s) selected.
Alignment Properties

Opens the Alignment Properties dialog box.

The following image shows the Alignment Properties dialog box with the default options.

Alignment Properties dialog box

Item width

Enter the width between the selected items. The default is one inch between items.

Justification

Select the justification for the alignment grid. Options are left, center, or right. Left is the default justification.

Decimal alignment

Decimal alignment specifies how far in from the right side of a column you want to place your decimal point. With this specification, you can locate the decimal point in the same position within a column, regardless of the number of decimal places displayed to its right. The measurement will be a portion of the width you have specified for this item.

Note: The Decimal alignment option is disabled when Justification is selected.

Merge

Merges selected horizontal items into one cell in the alignment grid.

Alignment Grid

Alignment grid shows or hides the grid.


Top of page

x
Reference: Insert Alignment Grid Dialog Box

When the alignment grid is enabled from the Properties menu in Report Painter for an empty subheading or subfooting, the Insert Alignment Grid dialog box opens. To enable the alignment grid for an empty subheading or subfooting:

The alignment grid appears as a dotted grid line within the heading or footing object. The additional alignment grid options are accessible from the Properties menu or from the right-click context menu of the heading or footing object in Report Painter.


Top of page

x
Styling the Alignment Grid With Grid Options and Cell Options

How to:

When using a heading or footing in Report Painter and enabling the Alignment Grid, you can align your border settings to the headings and footings with Grid Options and Cell Options.

Alignment grid is supported for reports in HTML, PDF, Excel 2000, and Excel 2007 output formats and aligns fields, text, and borders within report headings and footings with precision. With Alignment Grid enabled, Grid Options and Cell Options provide further styling options for the alignment items. Items refer to the cells in the grid.

Note: You can align text, fields, and borders in all types of headings and footings (Report Heading and Footing, Page Heading and Footing, and Subheading and Subfooting).



x
Procedure: How to Align the Heading and Footing With Data in a Report

The Align with Data option automatically aligns the alignment grid with the data columns in a PDF or HTML report.

  1. In Report Painter, create a PDF, HTML, Excel 2000, or Excel 2007 report containing a heading or footing, with text or fields, and click where you want to add alignment.

    Note: You can align text, fields, and borders in all types of headings and footings (Report Heading and Footing, Page Heading and Footing, and Subheading and Subfooting).

  2. Click Alignment Grid from the Properties menu.

    Note: You can also select Alignment Grid from the right-click context menu within a heading or footing.

    The alignment grid appears as a dotted grid line around each individual item in a heading or footing and shows how these items actually appear in your report output.

  3. Right-click an item in the heading or footing and select Grid Options from the context menu.

    The Properties dialog box opens for the heading or footing at the Style tab.

  4. Select the Align with Data check box, as shown in the following image.

    Note: Enabling the Align with Data option overrides any justify settings that are set from the Font toolbar (Left Justify, Center Justify, Right Justify, or Default Justify). The Align with Data check box is not available for Excel 2000 and Excel 2007 formats.

  5. Click OK to close the Properties dialog box.
  6. Run the report.

The following image shows a PDF report with a subheading for the Product column with Center Justify.

PDF report with a subheading showing center justify

The following image shows the same PDF report with the Align with Data option enabled. Note how the subheading aligns with the data column.

PDF rpeort with Align with Data option enabled



x
Procedure: How to Create Borders for the Entire Alignment Grid for a PDF Report

To create borders for the entire alignment grid or for all the cells within the grid, enable the Border all cells in the grid option.

  1. In Report Painter, create a report containing a heading or footing, with text or fields, and click where you want to add alignment.

    Note: You can align text, fields, and borders in all types of headings and footings (Report Heading and Footing, Page Heading and Footing, and Subheading and Subfooting).

  2. Click Alignment Grid from the Properties menu.

    Note: You can also select Alignment Grid from the right-click context menu within a heading or footing.

    The alignment grid appears as a dotted grid line around each individual item in a heading or footing and shows how these items actually appear in your report output.

  3. Right-click an item in the heading or footing and click Grid Options from the context menu.

    The Properties dialog box opens for the heading or footing at the Style tab.

  4. Check Align with Data.
  5. Click the Select Borders button.

    The Borders dialog box opens. By default, the Make all borders the same option is selected. Optionally, you may specify border settings for the top, bottom, left, and right borders, or keep the default settings.

  6. Click the Border all cells in the grid check box.

    Note: This option is off by default, as shown in the following image.

    Border all cells in the grid option from the Borders dialog box

    This creates borders for the entire alignment grid. If Make all borders the same option is unchecked, the border options are applied only for the cells within the grid.

  7. Optionally, select Align borders with data to automatically align the grid with the data columns in the PDF report. This option is off by default.
  8. Click OK to close the Borders dialog box.
  9. Click OK to close the Properties dialog box.

    The border options appear in the Report Painter window.

  10. Run the report.

The following image shows a PDF report with a subheading for the Product column with border settings for all the cells within the alignment grid.

PDF report with a subheading and border settings for the cell



x
Procedure: How to Set Borders for a Selected Cell in the Alignment Grid for a PDF Report

You may set the border for a selected cell in the alignment grid with the Cell Options.

  1. In Report Painter, create a PDF report containing a heading or footing, with text or fields, and click where you want to add alignment.

    Note: You can align text, fields, and borders in all types of headings and footings (Report Heading and Footing, Page Heading and Footing, and Subheading and Subfooting).

  2. Select Alignment Grid from the Properties menu.

    Note: You can also select Alignment Grid from the right-click context menu within a heading or footing.

    The alignment grid appears as a dotted grid line around each individual item in a heading or footing and shows how these items actually appear in your report output.

  3. Right-click an item in the heading or footing and select Grid Options from the context menu.

    The Properties dialog box opens for the heading or footing at the Style tab.

  4. Check Align with Data.
  5. Click OK to close the Properties dialog box.
  6. Right-click the item in the heading or footing and select Cell Options from the context menu.

    The Properties dialog box opens for the heading or footing at the Style tab.

  7. Click the Select Borders button.

    The Borders dialog box opens. By default, the Make all borders the same option is selected.

  8. To specify border settings for the top, bottom, left, and right borders, click the Make all borders the same check box to turn off that option. Make your border selections:
    • Click the down arrow in the Width drop-down list box and select:

      OFF to turn borders off.

      LIGHT to apply thin border lines.

      MEDIUM to apply medium border lines.

      HEAVY to apply thick border lines.

    • Click the down arrow in the Style drop-down list box and select a line style.
    • Click the down arrow in the Color drop-down list and select a color.

    The following image shows the Borders dialog box for Cell Options for a PDF report.

    Borders dialog box for Cell Options

  9. Optionally, select Align borders with data to automatically align the cell with the data columns in the PDF report. This option is off by default.
  10. Click OK to close the Borders dialog box.

    This creates borders for the selected cell in the alignment grid.

  11. Click OK to close the Properties dialog box.
  12. Run the report.

The following image shows a PDF report with a subheading for the Product column with border settings for the cell in the alignment grid.

PDF report with a subheading with border settings



x
Procedure: How to Span Columns for the Cell in the Alignment Grid for a Report

You may span columns and set the align object options for the selected cell in the alignment grid with the Cell Options. This option is available for a PDF or HTML report.

  1. In Report Painter, create a PDF or HTML report containing a heading or footing, with text or fields, and click where you want to add alignment.

    Note: You can align text, fields, and borders in all types of headings and footings (Report Heading and Footing, Page Heading and Footing, and Subheading and Subfooting).

  2. Select Alignment Grid from the Properties menu.

    Note: You can also select Alignment Grid from the right-click context menu within a heading or footing.

    The alignment grid appears as a dotted grid line around each individual item in a heading or footing and shows how these items actually appear in your report output.

  3. Right-click an item in the heading or footing and select Cell Options from the context menu.

    The Properties dialog box opens for the heading or footing at the Style tab.

  4. Click the Span Columns button.

    The Align Object dialog box opens.

  5. To specify how many data columns the selected cell should span, enter the number of columns.

    Note: The default cell spans one column.

  6. Select the justification for the selected cell data.

    Options are Left, Right, or Center. Left is the default justification for the span column cell data.

    The following image shows the Align Object dialog box with the default selections for span column.

    Align Object dialog box

  7. Click OK to close the Align Object dialog box.
  8. Click OK to close the Properties dialog box.
  9. Run the report.

The following image shows a PDF report with a subheading for the Product column with the default span columns settings. The selected cell spans one column and is left-justified.

PDF report with a subheading and default span columns

The following image shows the same PDF report with the align object options set to span three columns and is center-justified.

PDF report with the align object options set


Top of page

x
Aligning Decimals in a Multi-Line Heading or Footing

How to:

You can align decimal points when the data being displayed has varying numbers of decimal places. The ability to align heading content in a multi-line heading based on width and justification values has special benefit in reports that contain data with different numbers of decimal places. For example, if a figure is in dollars, it is formatted with a decimal point and two places for zeroes. If in Swiss Francs, it is formatted with a decimal place and four zeroes and if in Yen, the decimal is at the end with no zeroes. In addition, sometimes the currency does not vary, but the number of digits of decimal precision varies.

You can also use the Alignment Grid to align decimals in headings and footings with precision. For more information, see Aligning Fields and Text in Headings and Footings.

By aligning the decimal points in a vertical stack, you can more easily read and compare numbers.

The technique uses a width specification for the item that contains decimals, combined with a variation on standard left/right/center justification to achieve the proper decimal alignment. For more information, see Using Headings, Footings, Titles, and Labels in the Creating Reports With WebFOCUS Language manual.



x
Procedure: How to Align Decimals in a Heading or Footing

To determine the width of a heading or footing item:

  1. Identify the maximum number of characters in a field. You can refer to the format specification in the Master File or in a command, such as a DEFINE to determine the number.
  2. Right-click the embedded field in the page heading, page footing, subheading, or subfooting and select Alignment Grid.

    The alignment grid appears as a dotted grid line around each individual item in the heading or footing.

  3. Right-click the embedded field within the alignment grid and click Alignment Properties.

    The Alignment Properties dialog box opens.

  4. In the Item width field, enter the width between the selected items. This is the width of the maximum number of field characters you determined in step 1.
  5. Specify the distance from the right end of the item for the Decimal Alignment.

    Decimal alignment specifies how far in from the right side of a column you want to place your decimal point. With this specification, you can locate the decimal point in the same position within a column, regardless of the number of decimal places displayed to its right. The measurement will be a portion of the width you have specified for this item.

    Note: The Decimal alignment option is disabled when Justification is selected.

    The measurement will be a portion of the width you have specified for this item. For more information, see Using Headings, Footings, Titles, and Labels in the Creating Reports With WebFOCUS Language manual.

  6. Click OK to close the Alignment Properties dialog box.

WebFOCUS