Skip to content

KVSKBAReportUtilities#

Procedures#

GetBlockLine(Integer) : Text#

Obsolete

This Element will be removed or changed with a future Version of the App.

[Obsolete('The procedure is no longer used', '27.0')]
procedure GetBlockLine(BlockNoPar: Integer): Text

GetAddrBlockFromArray(Text[100]) : Text#

Summary: Formats an address block from a text array.

procedure GetAddrBlockFromArray(AddrArrayPar: Text[100]): Text

Parameters:

  • AddrArrayPar: Array of address lines (max. 10 lines, each up to 100 characters).

Returns: Formatted address block as a single text value with line breaks.

Remarks: This procedure takes an array of address lines and concatenates them into a single text block, inserting CRLF line breaks between each non-empty line. It skips empty lines at the end of the array, ensuring that the resulting address block does not have unnecessary trailing line breaks. If the address array contains only empty values, the result will be an empty string. This is useful for report layouts and document printing where address formatting consistency is required.

GetCRLF() : Text#

Summary: Returns the CRLF character sequence.

procedure GetCRLF(): Text

Returns: CRLF character sequence as Text[2]

Remarks: This function ensures that the CRLF sequence is set to 13 (Carriage Return) and 10 (Line Feed). It is used to format text blocks with line breaks.

GetUnitOfMeasureDescr(Code[10], Code[10]) : Text[50]#

Summary: Returns the description of a unit of measure in the specified language.

procedure GetUnitOfMeasureDescr(UOMCode: Code[10]; LanguageCode: Code[10]): Text[50]

Parameters:

  • UOMCode: The unit of measure code.
  • LanguageCode: The language code for translation.

Returns: The translated or default description of the unit of measure.

Remarks: This procedure retrieves the description for a given unit of measure code, optionally in a specified language. If a translation exists in the "Unit of Measure Translation" table for the provided language code, it returns the translated description. If no translation is found, it returns the default description from the "Unit of Measure" table. If the unit of measure code does not exist, the code itself is returned as a fallback. This ensures that reports and documents display user-friendly and localized unit descriptions where available.

GetDimText(Integer, Boolean) : Text#

Summary: Returns a formatted string of dimension codes and values for a given dimension set.

procedure GetDimText(DimSetIDPar: Integer; ShowInternalInfoPar: Boolean): Text

Parameters:

  • DimSetIDPar: The Dimension Set ID to retrieve dimension entries for.
  • ShowInternalInfoPar: Boolean indicating if dimension info should be shown.

Returns: Formatted string with dimension code and value pairs, separated by semicolons.

Remarks: This procedure retrieves all dimension entries for the specified Dimension Set ID and formats them as a single string. Each dimension is shown as "Dimension Code - Dimension Value Code", and multiple dimensions are separated by semicolons. If ShowInternalInfoPar is false, the function returns an empty string. If no dimension entries exist for the given set, an empty string is returned. This is useful for displaying dimension information in reports or document layouts in a compact, readable format.

FormatBold(Text) : Text#

Summary: Formats the given text as bold using HTML tags.

procedure FormatBold(SourceText: Text): Text

Parameters:

  • SourceText: The text to be formatted as bold.

Returns: The input text wrapped in HTML tags, followed by a space.

Remarks: This procedure wraps the provided text in HTML (bold) tags and appends a space at the end. It is intended for use in report layouts or document outputs that support HTML formatting, allowing for simple text highlighting. If the input text is empty, the result will be " ". This function does not perform any validation on the input and assumes the output will be rendered in an environment that interprets HTML tags.