The FormattedRecordArea element allows adding formatted text to a record area, which included HTML formatting elements embedded in the text. It also allows adding data from text or a field dynamically at runtime anywhere in between text. Add this layout element to a page or a report section's header, detail or footer. To embed JSON data, specify the field name between
#...# and it populates the value at runtime.
Refer to FormattedRecordArea layout element for a GitHub example.
Add a FormattedRecordArea by right-clicking and selecting Add Formatted Record Area from the context menu.
Dear #FirstName# #LastName#, in the JSON
The # symbol is a reserved character that is used to distinguish field names from static text. Hence, static content in FormattedRecordArea should not contain # symbols other than to specify field names. For example, the following string will cause an error because the first # symbol is a part of static content.
# of items in queue are #quantity#
Removing/replacing the first # symbol in static content as shown below will resolve the error. Alternatively, you could also escape the # sign by using another # sign, for example:
## of items in queue are #quantity#
The FormattedRecordArea can be resized or repositioned using the mouse, manually changing the values in the properties window or by changing the values directly in the source.
If you need to display a
# as a character, then you escape it by using two ##. For example, to display "Work Order #:" in the resultant PDF, you would use enter
Work Order ##: as the text in the Text property.
The FormattedRecordArea element has the following properties.
|leading||numeric||A value indicating the leading of the text.|
||A value indicating how the leading is calculated.|
|align||numeric||A value indicating the alignment of the FormattedRecordArea.|
|indent||numeric||A value indicating the first line indentation of the paragraph.|
|leftIndent||numeric||A value indicating the left indentation of the paragraph.|
|rightIndent||numeric||A value indicating the right indentation of the paragraph.|
|spacingAfter||numeric||A value indicating the spacing after the paragraph.|
|spacingBefore||numeric||A value indicating the spacing before the paragraph.|
|color||See Colors Users Guide topic.||A value indicating the color to be used for the font.|
|face||enumeration (see below)||A value indicating the font family to be used.|
|size||numeric||A value indicating size of the font to be used.|
|text||text||A value indicating the text of the FormattedRecordArea.|
||A value indicating the vertical text alignment.|
|id||text||A value indicating the programmatic identifier of the FormattedRecordArea.|
|angle||numeric||A value indicating the number of degrees to rotate the FormattedRecordArea.|
||A value indicating if text area can be expanded or not.|
|height||numeric||A value indicating the height of the FormattedRecordArea.|
|width||numeric||A value indicating the width of the FormattedRecordArea.|
|x||numeric||A value indicating the X coordinate of the FormattedRecordArea.|
|y||numeric||A value indicating the Y coordinate of the FormattedRecordArea.|
The face property specifies the initial font used in the document. You can use HTML tags to customize how you use fonts within the text.
The cleanParagraphBreaks property being set to
true will only have any affect on the FormattedRecordArea if the splittable property is also set to
true. In other words the paragraph will not break at all (and therefore never needs to consider the type of break) if the splittable property is set to
false. If however CleanParagraphBreaks is set to
true and splittable is also set to
true the will take care to make sure that any splitting performed on the FormattedRecordArea will always result in at least two lines of the paragraph being kept together (no orphaned lines). The only exception to this is if the paragraph itself is only one line then that one-lined paragraph will appear by itself.