COLHEADING

Turns on automatic display of the column header, and sets it to be output prior to display of the next non-suppressed output data row.

Syntax

{ COLHEADING }

Notes

  • The purpose of delaying the header output is to ensure that when no data follows a heading (due to suppression with a SUPMISSING or at the end of a report, for instance, a meaningless header is not generated.

  • IMMHEADING produces a new page and column heading immediately, without waiting for the next non-suppressed output line.

  • COLHEADING can be specified between the STARTHEADING and ENDHEADING commands to position the heading relative to other outputs defined in the custom heading.

  • When COLHEADING is used, the column members are displayed at the time the heading is generated, rather than immediately. Thus, if this command was issued at the start of the report script, it would still generate column headings only as part of the regular heading, and not as the first item on the page.

  • COLHEADING also displays column headings after they have been suppressed with either a SUPCOLHEADING, SUPHEADING, or SUPALL command.

  • By default, page and column headers (together called the HEADING) are turned on. This means they are displayed prior to the first actual output row in a report, and are reset to display again whenever:

    1. A new page is generated.

    2. Any member in the page or column dimensions changes.

  • A specific COLHEADING, PAGEHEADING, or IMMHEADING dictates a new heading. Once they are reset to "display", they are output just prior to the new non-suppressed output row.

Example

The following report script is designed for the Demo Basic cube, available in the gallery. The COLHEADING command displays the column heading members for a second time after displaying a blank line with the SKIP command.

<PAGE (Market, Accounts, Scenario)
Chicago Sales Actual
      <COLUMN (Year)
      <ICHILDREN Year
<ROW (Product)
<ICHILDREN Audio
{ SKIP COLHEADING }
<ICHILDREN Visual
     !

This example produces the following report:

                      Chicago Sales Actual 
                Qtr1   Qtr2   Qtr3   Qtr4    Year
             ======= ====== ====== ====== =======
Stereo         2,591  2,476  2,567  3,035  10,669
Compact_Disc   3,150  3,021  3,032  3,974  13,177
  Audio        5,741  5,497  5,599  7,009  23,846 

                Qtr1   Qtr2   Qtr3   Qtr4    Year
             ======= ====== ====== ====== =======
Television     4,410  4,001  4,934  6,261  19,606
VCR            3,879  3,579  4,276  4,877  16,611
Camera         2,506  2,522  2,602  3,227  10,857
  Visual      10,795 10,102 11,812 14,365  47,074