Forum > General

LazReport Memo CRLF problem



I have in my report memo object. Content is assigned in event OnGetValue, but when value is assined ParValue:='textX'+#13#10+'textY';  Then I will get no line change, only two block chars.
Out of ideas, how to perform line change ?

I'm using latest LazReport source from SVN

Thanks for you help

Sorry, my english not the best

I've noticed that:

if you add a line like

--- Code: ---Memo1.Lines.Clear;
Memo1.Lines.Add('textX'+#13#10+'textY');//it won't be splitted after the CRLF.
ShowMessage(Format('Memo1 has %d Lines.', [Memo1.Count]));//you have a single line with a CRLF in the middle.

Memo1.Lines.Text:='textX'+#13#10+'textY';//Text will be splitted after the CRLF.
ShowMessage(Format('Memo1 has %d Lines.', [Memo1.Count]));//you have 2 lines with a CRLF at the end of the first one.

--- End code ---

With "standard" Tmemo component I noticed this behavior.

But in LazReport, there is called "Rectangle object", it's just like "memo". When I replace content in OnGetValue event ParValue:='X'+#13#10+'X'; Then I have block chars. I tried also UTF8encode; every trick in the book, but still nothing  :-\
When I'm using OnEnterRect event and replace memo content, everything is Ok.

Something has changed, because my application compiled year ago works (but I can't remember LazReport version).  My application code hasn't changed since.

Could be LazReport bug ?

Currently using Lazarus 0.9.29 and FPC 2.4.3


[0] Message Index

Go to full version