Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Soft Return and Mail Merging

edited September 2002 in General
Is there a character that can be included in a database field so that a soft
return will be generated when the field is merged into a RichTextMemo?
Using #10#13 forces a new paragraph.

I wish to create something like the following with a database field:

Mike Simons
123 Street Name
Anywhere, NY 99999

The best I've been able to create using the #10#13 looks like the following
when generated:

Mike Simons

123 Street Name

Anywhere, NY 99999



Thanks,


--
Michael Simons
Software Programmer
Steven J. Baum P.C.
msimons@mbaum.com

Comments

  • edited September 2002
    You need to say #13#10, not #10#13. Test it on a Delphi TRichEdit on a
    TForm:

    RichEdit1.Lines.Add('Hello World.' + #13#10 + 'I am Zoltan.' + #13#10 +
    'Take me to your leader.');

    Versus:

    RichEdit1.Lines.Add('Hello World.' + #10#13 + 'I am Zoltan.' + #10#13 +
    'Take me to your leader.');



    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited September 2002
    > You need to say #13#10, not #10#13. Test it on a Delphi TRichEdit on a

    Excellent, it works as you say. I was not aware the order of those made a
    difference. I guess you learn something new every day. Thanks Jim.


    --
    Michael Simons
    Software Programmer
    Steven J. Baum P.C.
    msimons@mbaum.com
  • edited September 2002
    No problem, I didn't know it worked this way either. I just had a hunch
    that it could be the order causing the problem, so I created a test project
    and coded it both ways to find out. I learned something new too.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.