Class PaddingController

  • All Implemented Interfaces:
    Cloneable

    public class PaddingController
    extends Object
    implements Cloneable
    A datarow that acts as padding source. It overrides the columns from either report-data or expressions datarow with values collected by the crosstab-specification. It also provides padding for the advance calls.

    There are three padding scenarios that must be covered by this data-row:

    • Leading columns are missing

      The crosstab-specification's current cursor position is not at the computed position for the current column key (the column values read from the actual data-row). Therefore the system has to insert fake columns until the cursor has advanced to the current position. As we are effectively duplicating rows, this may lead to corrupted data if we duplicate non-group-columns.

    • Inner columns are missing

      After an advance, the computed column-key position is greater than the current cursor position. Therefore the system has to insert fake data until the positions match again.

    • Trailing columns are missing

      If the advance would trigger a group-break, check whether the current cursor position is already at the end of the columns list. If not, stay on the current row and insert as many fake rows as needed.

    The last two cases may be consolidated into one case.
    Author:
    Thomas Morgner