KVSKBADocumentHeadingBuffer
Fields
| Name | Type | Note |
|---|---|---|
| Doc Scope | Enum (KVSKBADocumentScope) | |
| Doc Type | Enum (KVSKBADocumentType) | |
| No. | Code[20] | |
| Doc. No. Occurrence | Integer | |
| Version No. | Integer | |
| Entry No. | Integer | |
| Heading Type | Option | OptionMembers: HeadingRight,HeadingLine1,HeadingLine2,HeadingLine3,HeadingLine4,HeadingLine5 |
| Column Value 1 | Text[255] | |
| Column Format 1 | Text[100] | |
| Column Value 2 | Text[255] | |
| Column Format 2 | Text[100] | |
| Column Value 3 | Text[255] | |
| Column Format 3 | Text[100] | |
| Column Value 4 | Text[255] | |
| Column Format 4 | Text[100] | |
| Column Value 5 | Text[255] | |
| Column Format 5 | Text[100] |
Procedures
GetFieldData() : Text
Summary: Builds the field data list for the current heading buffer record and returns it as a serialised text string.
procedure GetFieldData(): Text
Returns: A serialised text containing all column value and format token pairs for this heading record.
Remarks: The FieldDataList is re-initialised on every call, so previous entries are discarded. All five column value and column format fields are included using the layout tokens defined in the document header buffer. Use AddFieldValue to inject additional entries after calling this procedure.
AddFieldValue(Text, Text) :
Summary: Adds or updates a key-value pair in the field data list of this heading buffer record.
procedure AddFieldValue(LabelText: Text; ValueText: Text):
Parameters:
LabelText: The label (key) of the field to add or update.ValueText: The text value to store for the given label.
Remarks: If an entry with the same label already exists in the field data list it will be overwritten. Call GetFieldData first if you need the standard heading fields to be present before adding custom entries.
GetFieldValue(Text) : Text
Summary: Retrieves the value associated with the given label from the field data list.
procedure GetFieldValue(LabelText: Text): Text
Parameters:
LabelText: The label (key) whose value should be retrieved.
Returns: The text value stored for the given label, or an empty string if the label does not exist.
Remarks: Use this procedure to read back individual field values that were previously added via AddFieldValue or populated by GetFieldData.
GetTableType() : Enum
Summary: Determines the document table type based on the heading type of the current record.
procedure GetTableType(): Enum KVSKBADocumentTableType
Returns: The corresponding KVSKBADocumentTableType enum value for the heading type.
Remarks: This procedure maps the "Heading Type" option of the current record to a specific document table type (KVSKBADocumentTableType). It first raises the OnBeforeGetTableType integration event, allowing subscribers to override the default behavior. If not handled externally, the procedure uses a case statement to map each heading type (HeadingRight, HeadingLine1, ..., HeadingLine5) to its corresponding table type. If the heading type does not match any known value, HeadingRight is returned as the default. This mapping is used to control layout and formatting logic for document headings in reports and printouts.
GetLineType() : Enum
Summary: Returns the document line type for this heading buffer record.
procedure GetLineType(): Enum KVSKBADocumentLineType
Returns: Always returns KVSKBADocumentLineType::Default.
Remarks: Heading buffer lines are always treated as default lines. Override this behaviour in an extension if a different line type classification is required.
FormatDefault() : Text[100]
Summary: Returns the default RDLC format string for a heading column, respecting the print background setting.
procedure FormatDefault(): Text[100]
Returns: 'Normal,WhiteSmoke,Left' normally; 'Normal,,Left' when the company setting HideBackgroundInPrint is active.
Remarks: Use this format for standard heading columns that should have a WhiteSmoke background in screen/PDF output but suppress the background when printing to avoid unwanted grey areas.
FormatNormal() : Text[100]
Summary: Returns the RDLC format string for a normal (non-bold) left-aligned heading column without background.
procedure FormatNormal(): Text[100]
Returns: 'Normal,,Left'
Remarks: Use this format when no background colour is required regardless of the HideBackgroundInPrint setting.
FormatBold() : Text[100]
Summary: Returns the RDLC format string for a bold left-aligned heading column without background.
procedure FormatBold(): Text[100]
Returns: 'Bold,,Left'
Remarks: Use this format for label or caption columns that should always appear bold regardless of the HideBackgroundInPrint setting.
FormatNormalRight() : Text[100]
Summary: Returns the RDLC format string for a normal right-aligned heading column without background.
procedure FormatNormalRight(): Text[100]
Returns: 'Normal,,Right'
Remarks: Use this format for value columns that should be right-aligned without any background colour.
FormatBoldRight() : Text[100]
Summary: Returns the RDLC format string for a bold right-aligned heading column without background.
procedure FormatBoldRight(): Text[100]
Returns: 'Bold,,Right'
Remarks: Use this format for bold value columns that should be right-aligned without any background colour.
FormatNormalWhiteSmoke() : Text[100]
Summary: Returns the RDLC format string for a normal left-aligned heading column with WhiteSmoke background, respecting the print background setting.
procedure FormatNormalWhiteSmoke(): Text[100]
Returns: 'Normal,WhiteSmoke,Left' normally; 'Normal,,Left' when HideBackgroundInPrint is active.
Remarks: Use this format for normal-weight columns that require a WhiteSmoke background in screen/PDF output but should suppress the background when the company setting HideBackgroundInPrint is active.
FormatBoldWhiteSmoke() : Text[100]
Summary: Returns the RDLC format string for a bold left-aligned heading column with WhiteSmoke background, respecting the print background setting.
procedure FormatBoldWhiteSmoke(): Text[100]
Returns: 'Bold,WhiteSmoke,Left' normally; 'Bold,,Left' when HideBackgroundInPrint is active.
Remarks: Use this format for bold columns that require a WhiteSmoke background in screen/PDF output but should suppress the background when the company setting HideBackgroundInPrint is active.
Events
OnBeforeGetTableType(Record KVSKBADocumentHeadingBuffer, Enum KVSKBADocumentTableType, Boolean) :
Summary: Integration event: Allows subscribers to override the default table type mapping for a document heading.
[IntegrationEvent(false, false)]
local procedure OnBeforeGetTableType(DocumentHeadingBuffer: Record "KVSKBADocumentHeadingBuffer"; var DocumentTableType: Enum "KVSKBADocumentTableType"; var IsHandled: Boolean):
Parameters:
DocumentHeadingBuffer: The current KVSKBADocumentHeadingBuffer record.DocumentTableType: The document table type to be set by the subscriber.IsHandled: Set to true by the subscriber to indicate that custom logic was applied and default processing should be skipped.
Remarks: This integration event is raised before the standard logic in GetTableType is executed. Subscribers can use this event to provide custom mapping from heading type to document table type, for example to support additional heading types or implement company-specific layout rules. If a subscriber sets IsHandled to true, the default mapping logic is bypassed and the value assigned to DocumentTableType by the subscriber is used instead. This enables extensibility for report and document layout scenarios without modifying the base table logic.