Defines a temporary variable that can hold data in the current report context.
If used outside a report the value will only last for the current page request. Variables can be overwritten further down the page content, but are each unique to a particular report context. Use in conjuction with the Variable Supplier to retrieve variables for use.
|Name||Required||Available In||Default Value||Description|
The name for the variable. Any existing variable in the same context with the same name will be replaced.
Either value or a reporter in the macro body must be specified.
This can be a text value or an
Either a text value or an
The body can also be used to store a "reporter", such as Local Reporter or Content Reporter. The report results will be cached and can be reused multiple times on the same page. For example, the following will store the list of pages with the "foo" label in descending order as "foo":
It can then be executed in a report by using Local Reporter:
The same "variable:foo" could be used in other reports on the page, and even have additional "sort" or "filter" macros applied.
Setting variables to specific values
In conjunction with the Value Supplier, you can set a variable to a specific text, number or even Confluence content value:
You can set variables up to increment through a report loop.
Reusing Reporter configurations
The Query Supplier was added in Reporting 3.3.0. Ensure you have upgraded to use this example.
All Foo Children: