Table Settings

Settings of a report table are stored in the grid property of the settings element.

NOTE. This specification contains only the settings, which are used on the mobile device.

Property Description Available values
adjust It sets parameters for cell size autofit. Value is an element with the following properties:
  • mode. Autofit mode:

    • 0 – disabled.

    • 1 – height only.

    • 2 – width only.

    • 3 – first by width, then by height.

    • 4 – first by height, then by width.

    • 5 – autofit.

    • 6 – simplified.

  • maxRowsInCell. Maximum number of rows in a cell. It is available if the mode property is set to five.

  • minVisibleDataColumns. Minimum number of visible columns. It is available if the mode property is set to five.

cols Array that contains width of each column starting from the 0th one.

NOTE. If the adjust property is set to 0, values of column width are passed to a mobile device from the desktop application.

 

rows Array that contains width of each row starting from the 0th.

NOTE. If the adjust property is set to 0, values of column width are passed to a mobile device from the desktop application.

 

eaxtabstyle Table style.

It contains table style settings:

  • type. Property value is an element of the TabTablePredefinedStyle enumeration.

  • DefaultStyle. It contains the CustomFormat property that sets custom data display format.

Expanders Expanders.

It contains an array of elements with settings of expanders having the following properties:

  • L and T. Coordinate of a cell with expander.

  • W. Number of columns, which are collapsed or expanded by expander.

  • H. Number of rows, which are collapsed or expanded by expander.

  • IC. It determines whether hierarchy is collapsed.

totals It sets parameters of totals calculation.

Value is an element with the following properties:

  • emptyValuesAsZero. If the property is set to True, empty values are calculated as zero. If the property is set to False, empty values are not taken into account.

  • includeOwner. If the property is set to True, totals are calculated taking into account node values. If the property is set to False, node values are not taken into account.

  • overallTotal. If the property is set to True, totals are calculated. If the property is set to False, totals are not calculated.

  • hierarchyTotals. If the property is set to True, totals are calculated by each hierarchy level. If the property is set to False, totals are not calculated by hierarchy levels.

  • levelTotals. If the property is set to True, totals for rows or columns are shown after each hierarchy level. If the property is set to False, level totals are not shown.

data It sets parameters of data aggregation and ranking.
  • aggregateFixed. It enables or disables aggregation and selects aggregation type:

    • 0 – disabled.

    • 1 – sum.

    • 2 – from the source.

  • enableRank. It determines whether to show values as ranks, and selects ranking method:

    • 0 – none.

    • 1 – ascending.

    • 2 – descending.

  • rankArea. It determines rank application area:

    • 0 – in the entire data set.

    • 1 – in columns.

    • 2 – in rows.

gridFilter Sets filter parameters. Value is an element with the following properties:
  • enabled. If the value is true, filter is enabled. If the value is false, filter is disabled.

  • keepParent. Do not hide owners of non-hidden elements. If the value is true, element parents are displayed even if they do not satisfy filtering condition.

  • filterElements. Filtering elements.

  • filterZero. If the value is true, table cells that only non-numeric values are filtered. If the value is false, cells with zero values are not filtered.

  • filterEmpty. If the value is true, table cells that contain no information are filtered. If the value is false, empty cells are not filtered.

  • filterNonNumeric. If the value is true, table cells that only non-numeric values are filtered. If the value is false, cells with non-numeric values are not filtered.

  • filterUseCondition. If the value is true, conditional filtering is enabled. If the value is false, conditional filtering is not applied.

  • filterCondition. Filter condition:

    • 0 - no condition.

    • 1 - equal to А.

    • 2 - not equal to А.

    • 3 - greater than А.

    • 4 - less than A.

    • 5 - greater or equal to А.

    • 6 - less or equal to А.

    • 7 - between А and В inclusively.

    • 8 - less than А or greater than В.

  • filterConditionA. It sets number of A for filtering condition.

  • filterConditionB. It sets number of B for filtering condition.

gridSort It sets sorting parameters. If no sorting is applied in the table, the property value is an empty <dict/> element.
If the table is sorted by columns, the <dict> element has the columns property, which value an array of <dict> elements with the properties:
  • index. Column index.

  • direction. Sorting direction:

    • 2 – descending.

    • 1 – ascending.

gridPareto It sets parameters of distribution. It contains two identical properties Rows/Columns that determine parameters for rows/columns. Each property contains the following properties:
  • Top. It contains settings of top N elements.

  • Bottom. It contains settings of bottom N elements.

  • ElementIndex. It determines row or column index (numbering starts with zero, the first non-header row or column).

  • Enabled. It determines whether distribution can be applied to the specified row or column.

The Top/Bottom properties contain the following settings:

  • Threshold. Value determined by the user (percents are set via point, for example, 0.5).

  • Kind. It sets distribution type: 1 - by percent, 2 - by quantity, 3 - by sum.

  • Display. If the value is true, distribution is displayed, if the value is false, distribution is not displayed.

selection Table cells selection Value is an element array with the following properties:
  • left and top. Coordinates of left and top selection corner.

  • right and bottom. Coordinates of bottom and right selection corner.

  • type. Selection type:

    • cells - cell selection.

    • cols - column selection.

    • rows - row selection.

    • table - selection of entire table.

Example

Settings of a report table may look as follows:

<key>grid</key>
<!-- Table settings-->
<dict>
  <key>adjust</key>
  <!-- Autofit-->
  <dict>
    <key>mode</key>
    <integer>5</integer>
    <!-- Autofit type-->
    <key>maxRowsInCell</key>
    <integer>8</integer>
    <!-- Number of cells in row-->
    <key>minVisibleDataColumns</key>
    <!-- Minimum number of visible columns-->
    <integer>3</integer>
  </dict>
  <key>cols</key>
  <array>
    <integer>67</integer>
    <!-- Width of each column starting with the 0-th-->
    <integer>44</integer>
    <integer>50</integer>
  </array>
  <key>rows</key>
  <array>
    <integer>46</integer>
    <!-- Width of each row starting from the 0-th-->
    <integer>25</integer>
    <integer>25</integer>
  </array>
  <key>eaxtabstyle</key>
  <dict>
    <key>type</key>
    <integer>10</integer>
    <key>DefaultStyle</key>
    <dict>
      <key>CustomFormat</key>
      <string># ##0,00</string>
    </dict>
  </dict>
  <key>totals</key>
  <key>Expanders</key>
  <array>
  <dict>
    <key>L</key>
    <integer>0</integer>
    <key>T</key>
    <integer>1</integer>
    <key>W</key>
    <integer>0</integer>
    <key>H</key>
    <integer>3</integer>
    <key>IC</key>
    <integer>1</integer>
  </dict>
  <dict>
    <key>L</key>
    <integer>0</integer>
    <key>T</key>
    <integer>8</integer>
    <key>W</key>
    <integer>0</integer>
    <key>H</key>
    <integer>2</integer>
  </dict>
 </array>
  <dict>
    <key>emptyValuesAsZero</key>
    <string>false</string>
    <key>includeOwner</key>
    <string>true</string>
    <key>hierarchyTotals</key>
    <string>true</string>
    <key>levelTotals</key>
    <string>true</string>
  </dict>
  <key>data</key>
  <dict>
    <key>aggregateFixed</key>
    <integer>0</integer>
    <key>enableRank</key>
    <integer>0</integer>
    <key>rankArea</key>
    <integer>0</integer>
  </dict>
  <key>gridFilter</key>
  <dict>
    <key>enabled</key>
    <string>true</string>
    <key>filterElements</key>
    <integer>0</integer>
    <key>filterZero</key>
    <string>false</string>
    <key>filterEmpty</key>
    <string>false</string>
    <key>filterNonNumeric</key>
    <string>false</string>
    <key>filterUseCondition</key>
    <string>false</string>
    <key>filterCondition</key>
    <integer>0</integer>
  </dict>
<key>gridSort</key>
  <key>columns</key>
  <array>
    <dict>
      <key>index</key>
      <integer>0</integer>
      <key>direction</key>
      <integer>2</integer>
    </dict>
  </array>
<key>selection</key>
  <array>
    <dict>
      <key>left</key>
      <integer>0</integer>
      <key>top</key>
      <integer>0</integer>
      <key>right</key>
      <integer>0</integer>
      <key>bottom</key>
      <integer>1</integer> 
      <key>type</key>
      <string>cells</string>
    </dict>
   </array>
<key>gridPareto</key>
 <dict>
  <key>Rows</key>
   <dict>
    <key>Top</key>
      <dict>
       <key>Threshold</key>
       <real>10</real>
       <key>Kind</key>
       <integer>2</integer>
       <key>Display</key>
       <string>true</string>
      </dict>
    <key>Bottom</key>
      <dict>...</dict>
    <key>ElementIndex</key>
    <integer>4</integer>
    <key>Enabled</key>
    <string>false</string>
   </dict>
  <key>Columns</key>
   <dict>...</dict>
</dict>
</dict>

See also:

Express Report Settings