Recent

Author Topic: LazReport Memo CRLF problem  (Read 7370 times)

spl

  • Newbie
  • Posts: 5
LazReport Memo CRLF problem
« on: August 31, 2010, 11:21:26 am »
Greetings,

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


garlar27

  • Hero Member
  • *****
  • Posts: 652
Re: LazReport Memo CRLF problem
« Reply #1 on: August 31, 2010, 02:47:05 pm »
I've noticed that:

if you add a line like
Code: [Select]
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.Clear;
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.

spl

  • Newbie
  • Posts: 5
Re: LazReport Memo CRLF problem
« Reply #2 on: August 31, 2010, 04:18:15 pm »
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
« Last Edit: August 31, 2010, 04:21:38 pm by spl »

 

TinyPortal © 2005-2018