Hello everyone,
I'm working on customizing an AL report (Cheque
) in Business Central. The report includes a field that converts numeric amounts into words (AmountInWords
). However, when the converted text exceeds 45 characters, it overflows the designated textbox area on the cheque layout, disrupting the overall layout.
What I Want to Achieve:
AmountInWords
field.local procedure InsertLineBreak(InputText: Text; MaxLength: Integer): Text
var
FirstPart: Text[255];
SecondPart: Text[255];
begin
if STRLEN(InputText) <= MaxLength then
exit(InputText);
FirstPart := COPYSTR(InputText, 1, MaxLength);
SecondPart := COPYSTR(InputText, MaxLength + 1, STRLEN(InputText) - MaxLength);
exit(FirstPart + '\n' + SecondPart); // Tried using '\n', CRLF, and CHAR functions
end;
local procedure FormatPostingDateCustom(ADate: Date): Text
begin
exit(UPPERCASE(FORMAT(ADate, 0, 'dd-MMM-yyyy')));
end;
// Dataset Column Definition
column(PostingDate; FormatPostingDateCustom(GJLine."Posting Date"))
{
}
André Arnaud de Cal...
291,971
Super User 2025 Season 1
Martin Dráb
230,846
Most Valuable Professional
nmaenpaa
101,156