Reporting Table Item macro allows one to specify details about single column of reporting table: header, body cell and footer details:

  • One may either specify a plain text of the header, like "Column 1" or specify a formula, like "'Pages (' & JSONARRAYLENGTH(AllItems) & ')'". Note, that AllItems is a special variable, which is a set of all the query results, formed as an array of JSON objects.
  • Body parameters are specified for a single column cell and these parameters are repeated for each report line. There is a special variable CurrentItem, which corresponds to appropriate JSON object on each report line. So, this is a most tricky part of this plug-in: here you specify what will be the main contents of the reporting table by referencing current line JSON object fields and applying any functions to it. Note, that for the formulas to be processed the Body content type parameter value should be set to anything other than Text only. Examples:
    • "UPPER(CurrentItem.title)" - shows the page title in the uppercase.
    • "CurrentItem" - shows whole JSON object, which is convenient when configuring reports.
  • One may either specify a plain text of the footer, like "Column 1" or specify a formula, like "'Count: ' & JSONARRAYLENGTH(AllItems)". Note, that AllItems is a special variable, which is a set of all the query results, formed as an array of JSON objects.

Reporting Table Item macro has the following parameters:

Parameter Description
[Enum] Header content type (default='Text only')

Specifies, how the Header content parameter text should be processed - whether it is a plain text or a single formula or a mix of formulas and text. This parameter may have one of the following values:

  • Text only
    • Means, that the specified text will be shown as is. In this case no formulas are searched for in it.
    • Example: "Column A".
  • Single expression
    • Means, that the specified text is a formula, which should be calculated and its result will be shown.
    • Example header content: "'Pages (' & JSONARRAYLENGTH(AllItems) & ')'".
  • Text and expressions in square braces
    • Means, that there are the formulas in the text, enclosed in square brackets. All these formulas will be calculated and replaced with the calculation results.
    • Example header content: "Pages ( [JSONARRAYLENGTH(AllItems)] )".
  • Text and expressions in curly braces
    • Means, that there are the formulas in the text, enclosed in curly brackets. All these formulas will be calculated and replaced with the calculation results.
    • Example header content: "Pages ( {JSONARRAYLENGTH(AllItems)} )".
[String] Header content (default=''(Empty value))

Specifies the header content text. This value is processed according to Header content type parameter value (see examples above).

[Enum] Header output type (default='Plain text')

The way how the header content will be pre-processed before writing to the page. It may have one of the following values:

  • Plain text
    • Means, that the text will be shown as is.
    • (Technical) In this case the text is escaped before being shown, so '<' becomes '&lt;' and so on.
  • HTML
    • Means, that the text will not be escaped so you may specify or even calculate a correct HTML code to add any formatting or an image to your text.
    • In this case some additional checks are performed.
[Enum] Body content type (default='Single expression')

Specifies, how the Body content parameter text should be processed - whether it is a plain text or a single formula or a mix of formulas and text. This parameter may have one of the following values:

  • Text only
    • Means, that the specified text will be shown as is. In this case no formulas are searched for in it.
    • Example: "Text".
  • Single expression
    • Means, that the specified text is a formula, which should be calculated and its result will be shown.
    • Example body content: "'Child pages: ' & JSONARRAYLENGTH(CurrentItem.children.page.results)".
  • Text and expressions in square braces
    • Means, that there are the formulas in the text, enclosed in square brackets. All these formulas will be calculated and replaced with the calculation results.
    • Example body content: "Child pages: [JSONARRAYLENGTH(CurrentItem.children.page.results)]".
  • Text and expressions in curly braces
    • Means, that there are the formulas in the text, enclosed in curly brackets. All these formulas will be calculated and replaced with the calculation results.
    • Example body content: "Child pages: {JSONARRAYLENGTH(CurrentItem.children.page.results)}".
[String] Body content (default=''(Empty value)) Specifies the cell body content text. This value is processed according to Body content type parameter value (see examples above).
[Enum] Body output type (default='Plain text') Specifies the way how the body content will be pre-processed before writing to the page. It may have one of the following values:
  • Plain text
    • Means, that the text will be shown as is.
    • (Technical) In this case the text is escaped before being shown, so '<' becomes '&lt;' and so on.
  • HTML
    • Means, that the text will not be escaped so you may specify or even calculate a correct HTML code to add any formatting or an image to your text.
    • In this case some additional checks are performed.
[Enum] Footer content type (default='Text only')

Specifies, how the Footer content parameter text should be processed - whether it is a plain text or a single formula or a mix of formulas and text. This parameter may have one of the following values:

  • Text only
    • Means, that the specified text will be shown as is. In this case no formulas are searched for in it.
    • Example: "Column A".
  • Single expression
    • Means, that the specified text is a formula, which should be calculated and its result will be shown.
    • Example footer content: "'Total: ' & JSONARRAYLENGTH(AllItems)".
  • Text and expressions in square braces
    • Means, that there are the formulas in the text, enclosed in square brackets. All these formulas will be calculated and replaced with the calculation results.
    • Example footer content: "Total: ( [JSONARRAYLENGTH(AllItems)] )".
  • Text and expressions in curly braces
    • Means, that there are the formulas in the text, enclosed in curly brackets. All these formulas will be calculated and replaced with the calculation results.
    • Example footer content: "Total: {JSONARRAYLENGTH(AllItems)}".
[String] Footer content (default=''(Empty value)) Specifies the footer content text. This value is processed according to Footer content type parameter value (see examples above).
[Enum] Footer output type (default='Plain text')

The way how the footer content will be pre-processed before writing to the page. It may have one of the following values:

  • Plain text
    • Means, that the text will be shown as is.
    • (Technical) In this case the text is escaped before being shown, so '<' becomes '&lt;' and so on.
  • HTML
    • Means, that the text will not be escaped so you may specify or even calculate a correct HTML code to add any formatting or an image to your text.
    • In this case some additional checks are performed.
[Enum] Format type (default='None')
New!
Applies a per-column numeric format to an already-rendered cell value. When the value cannot be read as a number, the original text is returned unchanged, so a mis-typed column never breaks the report. May have one of the following values:
  • None – the cell text is passed through unchanged.
  • Number – formats the value as a plain number, using Format decimals fraction digits and the Reporting Table View macro's own Decimal symbol / Digit grouping symbol.
  • Currency – same as Number, with Format currency symbol prepended.
  • Percent – multiplies the value by 100 and appends '%'.
  • Date – reformats the value as a date, using Format pattern (see below).
Applied to both the body cell and, when set, the footer cell of the column.
[Int] Format decimals (default='2')
New!
The number of fraction digits to show for the Number, Currency and Percent format types (clamped to 0–20). Ignored for None and Date.
[String] Format currency symbol (default=empty)
New!
The symbol or prefix to prepend to the formatted number when Format type is set to Currency, for example '$' or 'EUR '. Ignored for other format types.
[String] Format pattern (default=empty)
New!
A date pattern used when Format type is set to Date, for example 'dd.MM.yyyy'. A blank value means 'yyyy-MM-dd'. The cell value may be an Excel-style date serial number or one of a few common date strings (for example 'yyyy-MM-dd', 'dd.MM.yyyy', 'MM/dd/yyyy'); an unrecognized value or an invalid pattern leaves the cell text unchanged. Dates are formatted in UTC.
[Enum] Footer aggregate (default='None')
New!
Computes a footer value over this column's own rendered body values, instead of a static Footer content. Non-numeric values are ignored for Sum / Average / Min / Max; Count counts the non-empty cells regardless of whether they are numeric. If nothing remains after filtering, the static Footer content is shown instead. The Format type options above, if set, are applied to the computed result. May have one of the following values:
  • None
  • Sum
  • Average
  • Count
  • Min
  • Max
[String] Column CSS class (default=empty)
New!
An optional space-separated list of extra CSS class names applied to this column's header, body and footer cells. Only letters, digits, underscore, hyphen and spaces are kept – any other character is stripped.
[String] Column width (default=empty)
New!
An optional CSS length applied as the column's width, for example '120px', '20%' or '10em'. Accepted units are px, em, rem, ex, ch, vw, vh, pt and %, or the literal value 'auto'; anything else is ignored.
[String] Text align (default=empty)
New!
An optional text alignment for this column's cells: 'left', 'center', 'right' or 'justify'. Any other value is ignored.
[String] Highlight when (default=empty)
New!
An optional formula, evaluated per row the same way as Body content, that decides whether the whole row should be highlighted. A blank result, the text 'false' or a numeric zero result count as false; any other result is treated as true. When several Reporting Table Item macros in the same row set a Highlight when formula, the first one (in column order) whose formula is true for that row wins.
[String] Highlight class (default='reporting-row-highlight')
New!
The CSS class added to the row's <tr> element when Highlight when is true for that row.