[DocumentBreak:]
Inserts a document break into a Word or HTML output document.
Purpose
Inserts a document break into a Word or HTML output document, e.g. a page break, column break, line break etc).
Macro Compatibility
The macro can be used in all input document types and in Report Studio.
Usage
Later, you can link back to this location with [Link:] / [EndLink:] macros, or move a section to this location with the [DocumentSection:] / [DocumentEndSection:] macros. The 'LineBreakClearLeft' and 'LineBreakClearLeft' break types apply to HTML output, and are the equivalent of:
and
Parameter | Type | Deprecation Message | Preferred Parameter | Presence | Purpose | Options | Default |
---|---|---|---|---|---|---|---|
BreakType | Use instead of:
| Optional | The break type. |
|
PageBreak | ||
String | Optional | Add a comment to make your document template more readable. The comment is discarded in the output document. | N/A | N/A | |||
Boolean | Optional | Should NCalc expression evaluation throw error on Overflow |
|
true | |||
String | Optional | The text to display should the macro fail to execute. Note that a poorly-specified macro (e.g. omitting mandatory parameters) will still result in an error message. | N/A | N/A | |||
String | Optional | The condition that must be true in order for the macro to be executed/evaluated. Must either evaluate to true or false, for example: "3+5=8" or "contains('abcd', 'z'). | N/A | true | |||
MacroMode | Optional | The mode in which variables are stored. In the legacy mode (default for Schedules), the variable created is a string and formatted. In the normal mode (default for Report Studio), the output variable is stored as a strongly-typed object, e.g. an Int32 or a List |
|
Legacy | |||
ObfuscationType | Optional | Obfuscation type. Use obfuscation to write reports where sensitive data is hidden. When used, ReportMagic guarantees that the same input string will map to the same output string for the whole of the report (but the next time the report runs, it will most likely map to a different value). If you use obfuscation, the property in your macro will not show up and instead, you will see a fake item of the obfuscation type chosen. |
|
None | |||
BreakType | Deprecated | breakType | The break type. |
|
PageBreak | ||
String | Optional | If specified, adds a warning message for this macro. This is processed as an NCalc, and the warning message will ALWAYS be present and will be the value of the evaluated NCalc expression. | N/A | N/A |
Examples (6)
Example 1:
This example inserts a column break:
[DocumentBreak: breakType=ColumnBreak]
Example 2:
This example inserts a line break:
[DocumentBreak: breakType=LineBreak]
Example 3:
This example inserts a page break:
[DocumentBreak: breakType=PageBreak]
Example 4:
This example inserts a line break with 'clear:left' in HTML output documents (but does nothing Word):
[DocumentBreak: breakType=LineBreakClearLeft]
Example 5:
This example inserts a line break with 'clear:right' in HTML output documents (but does nothing Word):
[DocumentBreak: breakType=LineBreakClearRight]
Example 6:
This example inserts a text wrapping break. In HTML output documents this is identical to the line break:
[DocumentBreak: breakType=TextWrappingBreak]