Table of Contents

KVSKBADocumentLineFormat

Fields

Name Type Note
Report ID Integer
Line Type Enum (KVSKBADocumentLineType)
FontFamily Text[50]
FontSize Decimal
FontColor Text[50]
FontStyle Enum (KVSKBAFontStyle)
TextDecoration Option OptionMembers: Default,None,Underline,Overline,LineThrough
Report Description Text[250] FlowField
Font Color Description Text[50] FlowField

Procedures

GetFontStyleText(Enum KVSKBAFontStyle) : Text[50]

Summary: Returns the CSS font-style text representation for the given font style enum value.

procedure GetFontStyleText(FontStylePar: Enum "KVSKBAFontStyle"): Text[50]

Parameters:

  • FontStylePar: The font style enum value to convert.

Returns: A text string such as 'Default', 'Normal', 'Bold', 'Italic', or 'ItalicBold'.

Remarks: If the enum value does not match any known style, 'Default' is returned as the fallback. The returned text is used directly in RDLC format strings.

GetLineFormat(Integer, Enum KVSKBADocumentLineType, Text, Decimal, Text, Enum KVSKBAFontStyle, Option) : Text[250]

Summary: Builds and returns the complete RDLC format string for a document line based on the given formatting parameters.

procedure GetLineFormat(ReportID: Integer; LineTypePar: Enum "KVSKBADocumentLineType"; FontFamilyPar: Text; FontSizePar: Decimal; FontColorPar: Text; FontStylePar: Enum "KVSKBAFontStyle"; TextDecorationPar: Option): Text[250]

Parameters:

  • ReportID: The report object ID for which the format is retrieved. Pass 0 to get the hardcoded default.
  • LineTypePar: The document line type for which the format is determined.
  • FontFamilyPar: Override font family. Pass empty text to use the stored or default value.
  • FontSizePar: Override font size in pt. Pass 0 to use the stored or default value.
  • FontColorPar: Override font colour. Pass empty text to use the stored or default value.
  • FontStylePar: Override font style. Pass Default (0) to use the stored or default value.
  • TextDecorationPar: Override text decoration. Pass 0 to use the stored or default value.

Returns: A comma-separated format string (e.g. 'Arial,9pt,Black,Normal,Default,Default') for use in RDLC layouts.

Remarks: The resolution follows a three-level hierarchy: (1) line-type-specific settings for the given ReportID, (2) default settings (ReportID 0 or line-type-specific global), (3) hardcoded company-info defaults. Parameter overrides always take precedence over stored values.

GetLineFormatDefault(Integer, Enum KVSKBADocumentLineType) : Text[250]

Summary: Returns the RDLC format string for a document line using all default formatting parameters.

procedure GetLineFormatDefault(ReportID: Integer; LineTypePar: Enum "KVSKBADocumentLineType"): Text[250]

Parameters:

  • ReportID: The report object ID for which the format is retrieved.
  • LineTypePar: The document line type for which the format is determined.

Returns: A comma-separated RDLC format string using the default font style and no overrides.

Remarks: Convenience wrapper around GetLineFormat that passes Default font style and zero for all override parameters. Use when no individual formatting overrides are needed.

GetLineFormatForStyle(Integer, Enum KVSKBADocumentLineType, Enum KVSKBAFontStyle) : Text[250]

Summary: Returns the RDLC format string for a document line with a specific font style override.

procedure GetLineFormatForStyle(ReportID: Integer; LineTypePar: Enum "KVSKBADocumentLineType"; FontStylePar: Enum "KVSKBAFontStyle"): Text[250]

Parameters:

  • ReportID: The report object ID for which the format is retrieved.
  • LineTypePar: The document line type for which the format is determined.
  • FontStylePar: The font style to apply (e.g. Bold, Italic).

Returns: A comma-separated RDLC format string with the specified font style and defaults for all other parameters.

Remarks: Convenience wrapper around GetLineFormat that passes zero for all other override parameters. Use when only the font style needs to differ from the stored setting.

CopyLineFormat(Integer, Integer) : Text[250]

Summary: Copies all document line format records from one report to another.

procedure CopyLineFormat(FromObjIDPar: Integer; DestObjIDPar: Integer): Text[250]

Parameters:

  • FromObjIDPar: The source report object ID. Must not be 0 and must differ from DestObjIDPar.
  • DestObjIDPar: The destination report object ID. All existing records for this ID are deleted before copying.

Returns: An empty string on success, or an error message text if source and destination are equal or the source is 0.

Remarks: All existing line format records for the destination report are removed before the copy. The procedure does not raise errors; instead it returns the error message text so the caller can decide how to handle it.

InitDocLineFormat(Integer) : Text[250]

Summary: Initialises the document line format records for the given report with a standard set of line types and their default formatting.

procedure InitDocLineFormat(DestObjIDPar: Integer): Text[250]

Parameters:

  • DestObjIDPar: The report object ID for which the line format records are initialised.

Returns: An empty string. The return value is reserved for future use.

Remarks: All existing line format records for the destination report are deleted before the new records are inserted. Default formatting is taken from the company info (font family, font size). Bold style is applied to header-related line types (HeaderLine, SubtotalHeader, BundleHeader, SubtotalBundleFooter); Italic style is applied to AlternativeLine. All other line types use Normal or Default style.

GetLineFormatDefaultIndent(Integer, Enum KVSKBADocumentLineType, Integer) : Text[250]

Summary: Returns the RDLC format string for a document line including an indentation value.

procedure GetLineFormatDefaultIndent(ReportIDPar: Integer; LineTypePar: Enum "KVSKBADocumentLineType"; IndentPar: Integer): Text[250]

Parameters:

  • ReportIDPar: The report object ID for which the format is retrieved.
  • LineTypePar: The document line type for which the format is determined.
  • IndentPar: The indentation level. Values greater than 0 are multiplied by the company indent-pt setting and appended as a pt value.

Returns: A comma-separated RDLC format string with the indentation appended as the last segment (e.g. 'Arial,9pt,Black,Normal,Default,Default,4pt').

Remarks: If IndentPar is 0, '0pt' is appended. The indentation in points is calculated as IndentPar × KVSKBALineIndentpt from company info. Use this procedure for line types that support hierarchical indentation in the report layout.

GetLineFormatForStyleIndent(Integer, Enum KVSKBADocumentLineType, Enum KVSKBAFontStyle, Integer) : Text[250]

Summary: Returns the RDLC format string for a document line with a specific font style and indentation value.

procedure GetLineFormatForStyleIndent(ReportIDPar: Integer; LineTypePar: Enum "KVSKBADocumentLineType"; FontStylePar: Enum "KVSKBAFontStyle"; IndentPar: Integer): Text[250]

Parameters:

  • ReportIDPar: The report object ID for which the format is retrieved.
  • LineTypePar: The document line type for which the format is determined.
  • FontStylePar: The font style to apply (e.g. Bold, Italic).
  • IndentPar: The indentation level. Values greater than 0 are multiplied by the company indent-pt setting and appended as a pt value.

Returns: A comma-separated RDLC format string with the font style and indentation appended.

Remarks: Combines GetLineFormatForStyle with indentation logic. If IndentPar is 0, '0pt' is appended. The indentation in points is calculated as IndentPar × KVSKBALineIndentpt from company info.

GetFontDecorationText(Option) : Text[50]

Summary: Returns the CSS text-decoration text representation for the given font decoration option value.

procedure GetFontDecorationText(FontDecorationPar: Option): Text[50]

Parameters:

  • FontDecorationPar: The font decoration option value to convert (0 = Default, 1 = None, 2 = Underline, 3 = Overline, 4 = LineThrough).

Returns: A text string such as 'Default', 'None', 'Underline', 'Overline', or 'LineThrough'.

Remarks: If the option value does not match any known decoration, 'Default' is returned as the fallback. The returned text is used directly in RDLC format strings.

GetFormattedFontSize(Decimal) : Text[20]

Summary: Formats a font size decimal value as a pt string for use in RDLC format expressions.

procedure GetFormattedFontSize(SizePar: Decimal): Text[20]

Parameters:

  • SizePar: The font size in pt. If 0 or negative, the company default font size is used.

Returns: A formatted string such as '9pt' or '10.5pt'.

Remarks: The decimal is formatted using the internal size format string constant. If SizePar is not greater than 0, the company info default font size (KVSKBAGetDocumentDefaultFontSize) is used instead. Ensure company info has been loaded via GetCompanyInfo before calling this procedure.

LookupFontColor() :

Summary: Opens the report format option lookup to let the user select a foreground colour and applies it to the FontColor field.

procedure LookupFontColor(): 

Remarks: If the user confirms the selection, FontColor is updated with the chosen option value and the calculated field "Font Color Description" is refreshed. If the user cancels the lookup, no change is made.