Compartir a través de


Create a conditional spanning header

Conditional spanning headers can span across multiple columns that are based on specific period data. For example, if you have a budget report for the fiscal year and you want to display the actual budgets of past months with the projected budgets of future months, you can use a conditional spanning header to automatically update the report header.

This topic contains the following sections:

  • Create a conditional spanning header

  • Example of a conditional spanning header

Be aware of the following situations when you create a conditional spanning header:

  • Any stop condition (Spread to field) that is matched before a start condition (Spread From field) is ignored. For example, if column B has the spread condition defined as BASE+1 to BASE, and if BASE is in column C and BASE+1 in column D, the stop condition in column C is ignored and the printing of the header starts at column D.

  • If you specify column headers that overlap, they print overlapped on the report. The following warning appears in the Report Queue Status although the report is still generated: “Column headers using Base intersect with other column headers and may cause overlapping text.” For example, if the header definition on column B is B to BASE+1, and the header definition on column D is BASE+1 to F, the headers are printed on top of each other and are unreadable. Whenever BASE is used in a Spread from/Spread to definition, view the generated report to verify whether the headers overlap.

  • If you specify BASE in the spread definition in a No Print (NP) column, it is ignored, regardless of what is defined in the column definition. Essentially, it is the same as not creating a column header definition.

  • For conditional printing columns (P<B, P>=B), conditional spanning headers behave as any regular column header definition, for example, if the condition is false, any subsequent column matching the spread condition starts the header printing.

Create a conditional spanning header

  1. In Report Designer, open the column definition to modify. Double-click a header cell.

  2. In the Column Header dialog box, enter the column header text, or click Insert AutoText and select an option.

  3. Select a formatting style for the header in the Format options field. For additional formatting options, see the “Format row and column text” section in Row definition.

  4. Specify a period relative to the base period that is specified when the report is generated. To do this, type one of the following options in the Spread from and Spread to fields: BASE, BASE-X or BASE+X, where X is the number of periods from the base period.

  5. For example, if you type BASE in the Spread from field, the conditional spanning column header text starts in the column header where the report definition Base period = column definition Period and ends in the column indicated in the Spread to field. Therefore, if the spread is BASE to M, and the report definition Base period = 4, the header starts in the column with the period set to 4 and ends at column M, inclusively. Headers stop and start on printing columns only.

  6. Under Justification, select whether the column header text should be left, center, or right justified.

  7. Click OK.

Example of a conditional spanning header

Phyllis is creating a report for a dynamic six-month forecast. She wants the word Actual to be printed over the columns that contain actual data, and the word Budget to be printed over the columns that contain budget forecasts. Each month that the report is run, there is one more actual column and one less budget column. Phyllis can modify the column definition manually each time that the report is generated to adjust the headers, but she decides to save time and effort and to create conditional spanning headers that will automatically create headers over the appropriate columns each time that the report is run.

Phyllis opens Report Designer, clicks Column Definition in the navigation pane, and opens the column definition for the report. She enters the following information. The Base period in the report definition is 4.

A

B

C

D

E

F

G

H

I

J

K

L

M

Header 1

Actual

Budget

Header 2

@CalMonthLong

@CalMonthLong

@CalMonthLong

@CalMonthLong

@CalMonthLong

@CalMonthLong

@CalMonthLong

@CalMonthLong

@CalMonthLong

@CalMonthLong

@CalMonthLong

@CalMonthLong

Header 3

Column Type

DESC

FD

FD

FD

FD

FD

FD

FD

FD

FD

FD

FD

FD

Book Code/Attribute

ACTUAL

BUDGET2012

ACTUAL

BUDGET2012

ACTUAL

BUDGET2012

ACTUAL

BUDGET2012

ACTUAL

BUDGET2012

ACTUAL

BUDGET2012

Fiscal Year

BASE

BASE

BASE

BASE

BASE

BASE

BASE

BASE

BASE

BASE

BASE

BASE

Period

1

1

2

2

3

3

4

4

5

5

6

6

Periods Covered

PERIODIC

PERIODIC

PERIODIC

PERIODIC

PERIODIC

PERIODIC

PERIODIC

PERIODIC

PERIODIC

PERIODIC

PERIODIC

PERIODIC

Column Width

30

10

10

10

10

10

10

10

10

10

10

10

10

Print Control

P<=B

P>B

P<=B

P>B

P<=B

P>B

P<=B

P>B

P<=B

P>B

P<=B

P>B

Phyllis double-clicks a column header cell to open the Column Header dialog box, where she enters the following information:

Field

Phyllis enters

Column header text

Actual

Insert AutoText

No selection made

Format options

Box

Justification

No selection made

Spread from

B

Spread to

BASE

Budget header

BASE+1 to end column

Phyllis clicks OK.

She then double-clicks the column header cell on column C to open the Column Header dialog box, where she enters the following information:

Field

Phyllis enters

Column header text

Budget

Insert AutoText

No selection made

Format options

Box

Justification

No selection made

Spread from

C

Spread to

BASE+2

See Also

Format columns