Choosing an Alignment Method for Heading and Footing Elements

To align text and data in headings and footings based on factors other than left/right/center justification, consider the following descriptions before deciding which alignment method best suits your needs.

Alignment Method

Applies to ...

When to use...

Related Methods

1) StyleSheet Attributes:

HEADALIGN

COLSPAN

JUSTIFY

Details: See Aligning a Heading or Footing Element in an HTML Report.

HTML

XLSX

EXL2K

PDF

PPTX

DHTML

To align heading or footing items in HTML and EXL2K reports: If you expect to display reports in HTML or EXL2K format, use HEADALIGN options to align heading and footing items with either columns in the HTML table for the body of the report or with cells in an embedded HTML table. The browser handles alignment based on your specifications, without requiring unit measurements, which are required with WIDTH and JUSTIFY.

To align heading or footing items in PDF reports: If you expect to display reports in PDF format, use the HEADALIGN=BODY option to align heading and footing items with columns in the report body.

To specify a heading or footing item that spans multiple columns: You can combine HEADALIGN syntax with the COLSPAN attribute to achieve this result. For details, see Aligning a Heading or Footing Element Across Columns in an HTML Report.

 

2) StyleSheet Attributes:

WIDTH

JUSTIFY

Details: See Aligning Content in a Multi-Line Heading or Footing.

HTML

PDF

PS

For portability between HTML and PDF: To code a request that can be used without revision to produce identical output in HTML (with internal cascading style sheets) and in PDF, use WIDTH and JUSTIFY attributes in your StyleSheet. These settings can be applied to report, page, and sort headings and footings.

To align heading or footing items: Used together, WIDTH and JUSTIFY allow you to align specific items in the heading, rather than entire headings or footings or entire heading or footing lines, where the implied justification width is the total width of the report panel. To right- or center-justify an item in a heading or footing, you must know the width of the area you want to justify it in. That information is provided by the WIDTH attribute.

To align decimal points in a multi-line heading or footing: Use this technique to align decimal points in data that has varying numbers of decimal places. You define the width of the decimal item, then you measure how far in from the right side of a column you want to position the decimal point. This places the decimal point in the same position in a column, regardless of the number of decimal places displayed to its right.

For an HTML, PDF, or EXL2K report, you can align specific items with HEADALIGN options.

3) StyleSheet Attribute:

POSITION

Details: See Positioning Headings, Footings, or Items Within Them and Laying Out the Report Page.

PDF

PS

HTML (limited)

To set starting positions for headings or footings, or items within them: Use POSITION syntax to specify absolute and relative starting positions.

In HTML, with an internal cascading style sheet, you can use POSITION to specify the starting point for a heading or footing line. You can also position an image in a heading or footing.

To align heading and footing items with columns: Use POSITION syntax to align a heading item with a column position. For example, the syntax

TYPE=SUBHEAD, LINE=1, ITEM=3,POSITION=SALES, $

places ITEM 3 of the sort heading at the horizontal position where the column SALES is.

For a PDF report, you can accomplish most positioning with WIDTH and JUSTIFY.

For an HTML or PDF report, you can align a heading item with a column by setting the HEADALIGN attribute to BODY.