Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
LazReport
»
New line in Memo by code
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Is this safe, changing fr...
by
Thaddy
[
Today
at 10:29:55 am]
Many recent books on Laza...
by
Thaddy
[
Today
at 08:47:32 am]
Difference between @ and ...
by
DavidTh30
[
Today
at 07:58:00 am]
try/except error
by
Thaddy
[
Today
at 07:23:48 am]
How to connect to MariaDb...
by
Thaddy
[
Today
at 07:18:13 am]
docking IDE
by
kapibara
[
Today
at 04:20:33 am]
Isn’t this funny?
by
Joanna
[
Today
at 12:04:29 am]
Error when opening a proj...
by
Tomu
[July 15, 2026, 09:36:13 pm]
Slow app start on M5 MacB...
by
Thaddy
[July 15, 2026, 03:36:57 pm]
Solpage
by
munair
[July 15, 2026, 01:47:30 pm]
Need help with fphttpserv...
by
Thaddy
[July 15, 2026, 12:58:30 pm]
Freepascal
by
Thaddy
[July 15, 2026, 12:39:23 pm]
Lazarus interface to Rexx...
by
Thaddy
[July 15, 2026, 12:38:10 pm]
Parsing error?
by
Thaddy
[July 15, 2026, 12:02:02 pm]
is there PDS reader/expor...
by
cdbc
[July 15, 2026, 10:55:30 am]
Peculiarities in the EXE ...
by
marcov
[July 15, 2026, 09:57:51 am]
Conscious Artificial Inte...
by
schuler
[July 14, 2026, 11:40:27 pm]
Lazarus Bugfix Release 4....
by
Martin_fr
[July 14, 2026, 10:55:23 pm]
equivalent to C/C++ "offs...
by
Thaddy
[July 14, 2026, 07:37:23 pm]
LazSWatch - a serial port...
by
CM630
[July 14, 2026, 06:11:52 pm]
MarcoV, please contact. ...
by
jbthiel
[July 14, 2026, 05:35:26 pm]
lazbuild vs IDE: PPU chec...
by
Martin_fr
[July 14, 2026, 05:30:50 pm]
OpenDocument('Filename') ...
by
cdbc
[July 14, 2026, 12:45:35 pm]
TCollection wiki entry
by
Thaddy
[July 14, 2026, 10:56:03 am]
Install new .deb over exi...
by
Thaddy
[July 14, 2026, 07:16:45 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: New line in Memo by code (Read 6017 times)
nmendes
Newbie
Posts: 2
New line in Memo by code
«
on:
January 04, 2019, 12:57:01 am »
I'm using LazReport for the first time and can't find a way to insert a newline to a memo by code. I'm using:
Code: Pascal
[Select]
[+]
[-]
procedure
TForm_base
.
frReport_recibosGetValue
(
const
ParName
:
String
;
var
ParValue
:
Variant
)
;
begin
if
ParName
=
'MEMO_TEST'
then
begin
ParValue
:
=
'Line 1'
+
LineEnding
+
'Line 2'
;
end
;
end
;
but it shows as
Line 1Line 2
instead of
Line 1
Line 2
Thanks in advance!
Logged
Jurassic Pork
Hero Member
Posts: 1290
Re: New line in Memo by code
«
Reply #1 on:
January 04, 2019, 01:41:18 am »
hello,
on Windows 10 64 bits, Lazarus 1.8.2 32 bits all is good with this code (see Attachments) :
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
frReport1GetValue
(
const
ParName
:
String
;
var
ParValue
:
Variant
)
;
begin
if
ParName
=
'ImageLink'
then
begin
ParValue
:
=
'Line 1'
+
LineEnding
+
'Line 2'
;
end
;
end
;
Friendly, J.P
Logged
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko
nmendes
Newbie
Posts: 2
Re: New line in Memo by code
«
Reply #2 on:
January 04, 2019, 02:11:11 am »
Hi Jurassic Pork,
I'm on windows 7, Lazarus 1.8.4 32 bits and it's not working for me... I'll try 1.8.2 to see if that's the problem.
Thanks for your time trying to help me!
Logged
Jurassic Pork
Hero Member
Posts: 1290
Re: New line in Memo by code
«
Reply #3 on:
January 04, 2019, 02:34:28 am »
my lazreport package version is the V0.9.9
and :
Quote
const LineEnding = #13#10
M:\Dev\Lazarus\lazarus1-8-2\fpc\3.0.4\source\rtl\win32\system.pp(43,2)
«
Last Edit: January 04, 2019, 02:46:45 am by Jurassic Pork
»
Logged
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
LazReport
»
New line in Memo by code
TinyPortal
© 2005-2018