Core Macros (48)
Name Description Restriction Compatibility
[Array:]
Creates an object array and stores the result.
Creates an object array and stores the result. This macro never outputs to the report directly.
[Array.Count:]
Determines the count of items in an array and stores the result.
Determines the count of items in an array and stores the result. This macro never outputs to the report directly.
[Break:]UPDATED
Breaks out of a [ForEach:] or [While:] loop.
Breaks out of a [ForEach:] or [While:] loop, and uses a similar structure to traditional "break" syntax in common programming languages. When loops are nested, it breaks out of the innermost one. Typically used in conjunction with an [If:] macro.
[Breakpoint:]
Stops processing a document.
Stops processing a document. Can fire conditionally on an expression.
[Calculate:]UPDATED
Performs a calculation.
This is used to calculate a result based on other macros and calculations.
[Color:]UPDATED
Outputs a hex-encoded colour string based on the percentage difference and specified intensity of an input colour.
Outputs a hex-encoded colour string based on the percentage difference and specified intensity of an input colour. Input colours can be specified by name (e.g. white) or hex-encoded (e.g. #FFFFFF, also white)
[Comment:]
Does nothing.
Does nothing. Useful for adding comments.
[Continue:]UPDATED
Skips the rest of the current iteration of a [ForEach:] or [While:] loop.
Skips the rest of the current iteration of a [ForEach:] or [While:] loop, similar to "continue" syntax in common programming languages. When loops are nested, it applies to the innermost one.
[Convert:]UPDATED
Convert a string, to or from a base64 string.
[Delete:]
Deletes a paragraph from a document.
[DeleteRow:]
Deletes a table row.
[DocumentBookmark:]
Marks a document location.
Marks a location in your document.
[DocumentBreak:]
Inserts a document break into a Word or HTML output document.
Inserts a document break into a Word or HTML output document, e.g. a page break, column break, line break etc).
[DocumentInsertSection:]
Insert a previously-defined section.
Insert a section of the input document, which has previously been created with the [DocumentSection:] macro. A section must be defined before it can be inserted, in other words, the [DocumentInsertSection:] macro must come after the [DocumentSection:] macro that defines the name of the section.
[DocumentSection:]UPDATED
Specifies the start of a document section.

Use the [DocumentSection:] / [DocumentEndSection:] macro to define a section of the input document, which can be moved to a predefined bookmark in your Word document.

Bookmarks can be manually created in Word, or you can use the [DocumentBookmark:] macro.

Note that the [DocumentSection:] / [DocumentEndSection:] macro requires that bookmarks do not span a selection of text, in other words they should be inserted at a single character position in the input document.

Sections can be nested. Each [DocumentSection:] pairs with its own [DocumentEndSection:], and an inner section is finished first, so the outer section includes whatever the inner one left in place.

The document section is inserted at the bookmark specified (or saved in a variable) when fully processed, i.e. graphs, and tables etc will be fully rendered and processed first.

The storeAs parameter can be used to reference the section by name, and inserted using the [DocumentInsertSection:] macro.

[Email:]UPDATED
Specifies the start of an e-mail section.
[EmailFile:]
Emails a specific file or files once the report is complete.
[EmailReport:]
Emails the entire completed report once complete.
[Execute:]
Executes C# code.
[ForEach:]UPDATED
Loops over a set of values.
Use the [ForEach:] / [EndForEach:] macros to loop over a number of values, repeating a section of the input template as it does so.
[FormatTableCell:]
Formats the background colour of the current table cell.
[FormatTableRow:]
Formats the background colour of the current table row.
[If:]UPDATED
Conditionally process a section of the input document.
[Ignore:]UPDATED
Ignore (i.e. do not process macros) a section of your input document
Ignore (i.e. do not process macros) a section of your input document. This is particularly useful when testing macros using Report Studio, if you want to temporarily disable large chunks of input processing. Blocks can be nested: an [Ignore:] block ends at its own [EndIgnore:], not at the first one inside it.
[Inc:]
Increments a variable, or decrements it if using a negative value.
Increments a variable, or decrements it if using a negative value. If the variable is not already set, it is assumed to be zero (0).
[InsertTableCellImage:]UPDATED
Inserts an image as the background of the current table cell.
[IsSet:]BREAKING CHANGE
Determines whether a variable is set.
Determines whether a variable is set. Can be used with the [Unset:] macro (see example, below).
[LinearRegression:]
Performs a linear regression.
The Linear regression macro takes any number of DateTime^Number, input values and calculates the line of best fit for:Y = MX + C... where: Y is the numeric value; X is the number of days since the Epoch; and M and C are constants.Three output values are returned: M, C and R-squared ("Goodness of fit" - a percentage). See the example.
[Link:]UPDATED
Inserts a hyperlink into the output document

Inserts a hyperlink into the output document. The [EndLink:] macro marks the end of the hyperlink.

Note that the macro does not check whether the URL specified is well-formed. Authentication of the user on any end system is NOT supported, so if the destination URL requires a username/password, you may have to log into the site before the link will work as expected.

[Map:]
Inserts a map into the report.
[Object:]
Creates an object and stores the result.
Creates an object and stores the result. This macro never outputs to the report directly.
[Random:]UPDATED
Generates a random number.
Generates a random integer or double, optionally between min and max values.
[Regex:]UPDATED
Extract strings from other strings.
Uses Regular Expressions to extract strings from other strings. Match groups are stored delimiter-separated. Within each match group, individual entries are stored carat-separated. The "g" modifier, as used in Javascript and Perl languages is always applied to obtain multiple regex groups. Search the web for 'online regex tools' for practical assistance in constructing regular expressions.
[RepeatRow:]UPDATED
Copies the current table row a number of times below this row, setting a variable for each line
Copies the current table row a number of times below this row, setting a variable for each line.
[SearchAndReplace:]UPDATED
A global "Search and Replace" function
Performs a case-sensitive "Search and Replace". In Word and HTML it can be global (default) or can be limited to just the previous table. In PowerPoint it covers the current slide (default) or, with the 'powerPointScope' parameter, every slide in the presentation; 'scope=previousTable' limits it to the table on the current slide. As with other macros, these are run in the order they appear in the template, so may affect each other. Note that the contents of the report at the time the macro is run are considered.
[Section:]
Indicates the start of a section on the progress screen.
Useful to indicate in Progress screens where a named section starts.
[Settings:]
Sets macro parameters for all subsequent macros of this type.
[Sleep:]
Sleeps / delays for a specified duration.
[Stop:]
Stops the current Report Job.
Stops the current Report Job. No further Macros will be processed. Other Report Jobs in the Batch Job will continue to run.
[Stopwatch:]
Controls a stopwatch.
Controls a stopwatch. The value returned is the stopwatch value at the moment the macro was executed, but before any reset.
[String:]UPDATED
Constructs a string.
[StringIndex:]
Locates the position of a string within another.
Locates the first position of one string within another. If the sub-string is not found, outputs -1.
[Substring:]
Extracts a portion of a string, using a sub-string of the input value.
[Switch:]UPDATED
Conditionally includes a section of the Word document.
Conditionally includes a section of the Word document, and uses a similar structure to traditional 'switch' syntax in common programming languages.
[ThrowException:]
Throws an exception.
Throws an exception. Used for testing.
[Unset:]
Unsets one or more variables.
Unsets one or more variables. Does not error if the variable is already not set. Use with the [IsSet:] macro (see example, below).
[Warning:]
Does nothing, but the macro will appear as a warning in the progress screen.
[While:]UPDATED
Loops while a condition is true.
Use the [While:] / [EndWhile:] macros to repeat a section of the input template while a condition evaluates to true. This is useful for paginated API calls or other scenarios where the iteration count is not known upfront.

Reconnection

Reconnection

Reconnection

timed out

timed out

Attempt of

Reload
An unhandled error has occurred. Reload 🗙