CRLF in Textelement
Good Day,
I have a problem with the Text and the Memo element.
My goal is to remove or ignore the CRLF control character. The value of the Textelement is '[frxdsqryData."Name"]'
Unfortunately in this field the Name is stored like this:
'Mr.
John Smith'
So the Textelement only shows 'Mr.'
What I want is 'Mr. John Smith'
I don't want to make the element higher then 1 unit.
Already tested:
Clipped true / false
CR true/false
Any idea? Thanks for your help
I have a problem with the Text and the Memo element.
My goal is to remove or ignore the CRLF control character. The value of the Textelement is '[frxdsqryData."Name"]'
Unfortunately in this field the Name is stored like this:
'Mr.
John Smith'
So the Textelement only shows 'Mr.'
What I want is 'Mr. John Smith'
I don't want to make the element higher then 1 unit.
Already tested:
Clipped true / false
CR true/false
Any idea? Thanks for your help
Comments
var
pp : integer;
str01,
str02,
newstr,
str : string;
begin
newstr := '<blank>';
str := Trim( <ppxAcc."DA_NOTES"> ); // trim just to be safe
pp := Pos( #13#10, str );
if pp > 0 then
begin
str01 := Copy( str, 1, pp - 1 );
str02 := Copy( str , pp + 2, 128 ); // crlf is a 2 character pair
newStr := str01 + ' ' + str02;
end;
fldNotes.Text := newstr;
end;
so its only possible to remove the CRLF by get the position of it and ignore it while copy the data.
Thanks a lot, I will test it in a few hours and post the result.
Thanks technisoft
so I modified your Code a little bit:
Thanks for your help. And Topic can be closed