Specifying Column Formats

Specifications for column formatting commands can precede or follow the columns to which they apply, depending on the desired format.

For example, in the following script, based on the Sample.Basic database, the first {DECIMAL} command is processed after two columns are set up, Actual and Budget. The {DECIMAL} command, however, refers to a column three, which does not yet exist. Essbase responds to this command by dynamically expanding the report to three columns. When the report specification expands to six columns, the {DECIMAL} formatting applies to columns three and six (and all multiples of three).

Essbase performs this pattern extension on the assumption that when another dimension is added, causing repetitions of previous column dimension groups, the formatting should repeat as well. The second {DECIMAL} formatting command is then applied to columns 1 and 4 only, as it occurs after the creation of six columns.

Example report script:

<PAGE (Measures, Market)
Texas Sales
     <COLUMN (Scenario, Year)
     Actual Budget
{DECIMAL 2 3 }
     Jan Feb Mar
{DECIMAL 1 1 4 }
<ROW (Product)
<DESCENDANTS "100"
    !

Resulting report:

                           Sales Texas

                 Actual                    Budget
          Jan      Feb      Mar      Jan      Feb      Mar
          ===      ===      ===      ===      ===      ===
100-10   452.0     465    467.00    560.0     580    580.00
100-20   190.0     190    193.00    230.0     230    240.00
100-30 #MISSING #MISSING #MISSING #MISSING #MISSING #MISSING

The following scripts demonstrate two approaches to column formatting that produce identical results. In the first script, the first two {DECIMAL} commands are positioned to format every first and third column by distributing the formats when Jan Feb displays after processing the {DECIMAL} command.

Example report script: Format columns by distributing the formats

California Sales
     <COLUMN (Scenario, Year)
     Actual Budget Variance
{DECIMAL 1 1 }
{DECIMAL 2 3 }
     Jan Feb
     //     {DECIMAL 1 1 4 }   These lines are commented; the
     //     {DECIMAL 2 3 6 }   Report Extractor ignores them.
<ROW (Product)
<DESCENDANTS "100"
    !

The two {DECIMAL} commands are positioned to format the individual columns 1, 3, 4, and 6.

Example report script: Format columns by direct assignment

<PAGE (Measures, Market)
California Sales
     <COLUMN (Scenario, Year)
     Actual Budget Variance
     //     {DECIMAL 1 1 }     These lines are commented; the
     //     {DECIMAL 2 3 }     Report Extractor ignores them.
     Jan Feb
{DECIMAL 1 1 4 7 }   
{DECIMAL 2 3 6 9 }
<ROW (Product)
<DESCENDANTS "100"
    !

Resulting report for both scripts:

                          Sales California

              Actual          Budget            Variance
           Jan     Feb     Jan       Feb     Jan       Feb
         =====    ====    ====      ====    =====      ====
100-10   678.0     645   840.00    800.0    (162)  (155.00)
100-20   118.0     122   140.00    150.0     (22)   (28.00)
100-30   145.0     132   180.00    160.0     (35)   (28.00)

Note:

By default, attribute calculation dimension members (for example, SUM, AVG) are displayed as columns. To display them in rows, you must include them in the ROW command.