Override the _getColumnDimInfo method of the Table Data Model.
/* This is a method override for the _getColumnDimInfo method
* of the Table Data Model, which provides the table editor with
* the column dimension hierarchy information. Parameters passed
* to this method:
* 'level' - specifies the address of the column dimension being
* requested.
* 'num_cols' - returns the number of columns that are present
* at the requested dimension.
* 'sub_cols' - returns whether the requested dimension has any
* subdimensions.
* 'height' - not used in this example.
* 'units' - not used in this example.
* 'groups' - not used in this example.
* 'eod' - not used in this example. */
GETCDIM: method level num_cols sub_cols height 8 units $ 4 groups 8 eod $ 1;
/* Determine which column level is being requested and indicate
* (1) How many columns (num_cols) the table has for this dimension.
* (2) Whether this dimension has any subdimensions (sub_cols).
* At the top level dimension, there are 3 columns and each has
* subdimensions. */
len = listlen( level );
if ( ^len ) then
do;
num_cols = 3;
sub_cols = 1;
end;
/* At the second level dimension, there are 2 columns and each has
* subdimensions. */
else if ( len = 1 ) then
do;
num_cols = 2;
sub_cols = 1;
end;
/* At a third level dimension, there is 1 column and with no
* subdimensions. */
else
do;
num_cols = 1;
sub_cols = 0;
end;
endmethod;