How to Add a CR/LF¶
To insert a new line character in a text box, the result of a formula, or a value from a database column, the following methods can be used:
- Textbox: Simply press the ENTER key between both parts of the text.
- Function: Insert the
Chr(10)result between both parts of the results that need to be printed on separate lines. - Database column: Put the character 13 value in the database or print the result of the column via a function where a special character is replaced by the
Chr(10)character.
The following function code replaces the characters \n with a line feed character:
dim sResult
let sResult={Textfield.LongDescr}
while Instr(sResult,'\n') do
let sResult=Replace(sResult,'\n',Chr(10))
end
return sResult
Notes¶
- Make sure the object is high enough or is set to variable height.