Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Import Macro Repair

...

Description

Displays a single column in

...

a Report Table.

This macro will usually contain at least one use of the Report

...

Info macro or another macro

...

that displays information about the current item being reported

...

.

Parameters

Name

Required

Migratable to Cloud?

Default Value

Description

title

  • Status
    title(/)

...

  • Status
    titleNO

The title header to display

width

  • Status
    title(

...

  • X)

  • Status
    titleNO

The width of the column.

e.g.: "50px", "20em".

summaryType

  • Status
    title(

...

  • X)

  • Status
    titleNO

The type of summary to display at the end of this column.

May be one of:

  • sum - The sum total of all numbers in the column.

  • count - The number of non-blank values in the column.

  • average - The average of all numbers in the column.

  • stats - (Since 3.2.0) Gives access to all stats.

See summaryFormat for details.

Note that for all of the above parameters (except count), you MUST specify the summaryValue for the value that you wish to calculate the statistics for.

summaryValue

  • Status
    title(

...

  • X)

  • Status
    titleNO

The key chain value for the column summary, or plain text to display if the 'summaryType' is not set for this column.

e.g. "data:My Number", or "content:children > collection:size".

Note

The summary value key can be completely unrelated to what is displaying in the column, if so desired.

summaryFormat

  • Status
    title(

...

  • X)

  • Status
    titleNO

The number format to use for the summary.

e.g.: "$#,##0.00".

(Since 3.2.0) If summaryType is stats, you can specify a %keychain% value here to output custom stats based on the Stats object.

e.g.: "Sum: %stats:sum%; Avg: %stats:value average%" 

colSpan

  • Status
    title(

...

  • X)

  • Status
    titleNO

1

(Since 3.2.0) The number of columns that this column should span across. 

injected

  • Status
    title(

...

  • X)

  • Status
    titleNO

false

(Since 2.0.0) If set to true, the body will have any '%prefix:keychain%' values injected with values from the current report item prior to being rendered. 

rowSpan

  • Status
    title(

...

  • X)

  • Status
    titleNO

1

(Since 3.2.0) The number of rows that this column should span down.

newRow

  • Status
    title(

...

  • X)

  • Status
    titleNO

false

(Since 3.2.0) If true, a new row will be started with this column. This is most useful in conjunction with colSpan and rowSpan.

class

  • Status
    title(

...

  • X)

  • Status
    titleNO

(Since 3.2.0) The CSS class(es) to add to this column.

Editor View

...

Macro Edit View

  • Not applicable.

Notes

Examples

Keychain Injection

Output the title and excerpt of each child page.

Code Block
{report-table}
{local-reporter:content:children}
{local-reporter}
 
{report-column:injected=true|title=Title}%content:title%{report-column}
{report-column:title=Body}{report-info:content:excerpt|render=wiki}{report-column}
 
{report-table}

Spanning Rows and Columns

Sometimes it's useful to have a column take up more space, or have two values one below the other.

...

Using colSpanrowSpan

...

, and newRow can help with more complex table layouts.

The example below will render the title on one row, the body on the next (spanning two rows itself), and the "Creator" and "Modifier" details on the right-hand side in two separate cells. Note the use of

...

the class

...

 parameter on some columns to allow custom styling for those cells.

Code Block
{report-table:displayTitles=false}
{local-reporter:content:children}
  {text-sort:content:title}
{local-reporter}
 
{report-column:title=Title|colSpan=2|class=MyTitle}{report-info:title|link=true}{report-column}
 
{report-column:title=Content|rowSpan=2|newRow=true}{report-info:body|render=wiki}{report-column}
{report-column:title=Creator|class=MyInfo}Created by {report-info:creator|link=true} @ {report-info:creation date|format=d MMM, yy h:mm a}{report-column}
 
{report-column:title=Modifier|newRow=true|class=MyInfo}Last post by {report-info:modifier|link=true} @ {report-info:modification date|format=d MMM, yy h:mm a}{report-column}
 
{report-empty}_No results are currently available._{report-empty}
 
{report-table

...

}

Tutorial Examples

...

All page states within a space

...

All pages with the 'Approved' state in the last month

...

Building a Forum in Confluence with Reporting

...

Calculating Work Hours in a Day

...

Create a report to monitor project status

...

Creating an IF ELSE statement with Reporting

...

Customizing a Report with Image Attachments

...

Displaying a list of images attached to the current page

...

Extract values from page titles using regex

...

Extract values from page titles using Reporting Text Supplier

...

Extracting Scaffolding Data from Children Pages

...

Extracting Scaffolding Data from children pages and modifying values using Reporting macro

...

Filter page results based on user

...

Generating a List of Groups for the Current User

...

Generating a List of Pages with No Label

...

Generating a List of Redirecting Pages

...

List All Comments Including Unresolved Inline Comments

...

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
excerptTypesimple
cqllabel = "report-column"