Numbering Columns

If the number of regular (not calculated) columns varies in the report because multiple sections in the report have different numbers of columns, the column numbers used to identify the calculated columns shift accordingly, as illustrated:

In the example, CC1, CC2, and CC3 represent the names of three calculated column names. The column numbering for a report with two different sections with varying numbers of regular columns:

internal
col # s: 0    1      2      3     4     5     6     7   
            Jan    Feb    Mar   Apr   CC1   CC2   CC3 
            ===    ===    ===   ===   ===   ===   === 
   Sales      1      3      5     3    22    55    26 
   Expense    1      2      5     3    23    65    33 

                 same report- new section 
internal 
col # s: 0    1      2      3     4     5 
           Qtr1    YTD    CC1   CC2   CC3 
            ===    ===    ===   ===   === 
   Sales      2      9     22    57    36 
   Expense    4      8     56    45    33

If you do not want the calculated columns in the second section, or if you need a different set of column calculation, use the command REMOVECOLCALCS to clear the old ones out. You can then define new column calculations.

This example assumes that all three column calculations had no references to regular columns other than columns 1 and 2. If CC3's calculation were = 1 + 3 + 6, when the second section of the report starts, an error occurs stating that the column calculation referred to a nonexistent column (6).